0% found this document useful (0 votes)
395 views

Oracle Linux: Cheat Sheet

This document provides a cheat sheet on system administration and file/directory management commands for Oracle Linux. It lists many common commands used to control services, manage users and permissions, view system information and manage storage and networking.

Uploaded by

kvigneshk2001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
395 views

Oracle Linux: Cheat Sheet

This document provides a cheat sheet on system administration and file/directory management commands for Oracle Linux. It lists many common commands used to control services, manage users and permissions, view system information and manage storage and networking.

Uploaded by

kvigneshk2001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Oracle Linux

Cheat Sheet

System Administration File and Directory Management


Control the systemd system and service
systemctl ls List the contents of a directory
manager
Start, stop and check the status of
service cd Change the current working directory
system services
Change the current working directory
init Start the system initialization process cd ~
to the user's home directory
shutdown Shut down the system pwd Print the current working directory
reboot Reboot the system mkdir Create a new directory
Display system information, including
uname rmdir Remove an empty directory
the kernel version
Create an empty file or updates the
ss Display socket statistics touch
modification time of an existing file
arp Manipulate the system ARP cache cp Copy a file or directory
Display or modify Ethernet device
ethtool mv Move or renames a file or directory
settings
firewall-cmd Manage the firewall rm Remove a file or directory
lsmod List currently loaded kernel modules ln Create a hard or symbolic link to a file
modprobe Add or remove kernel modules file Determine the file type of a file
insmod Insert a kernel module into the kernel find Searche for files in a directory hierarchy
Searche for files in a database of file
rmmod Remove a kernel module locate
names and paths
dmesg Display kernel message buffer split Split a file into smaller files
journalctl Query and display system journal logs join Join two or more files together
Count the number of lines, words, and
free Display memory usage information wc
characters in a file
df Display disk usage information cat Concatenate and displays files
Display disk usage of files and
du head Display the first few lines of a file
directories
mount Mount file systems tail Display the last few lines of a file
Display the contents of a file one page
umount Unmount file systems less
at a time
Display the contents of a file one
lsof List open files more
screenful at a time
Compare two files and displays the
who Display logged-in users diff
differences
Compare two files byte by byte and
last Display recent logins cmp
displays the first differing byte
history Display command history patch Apply a patch file to a file or set of files
crontab Edit and manage user cron jobs sort Sort the lines of a file
Schedule commands to run at a specific Remove duplicate lines from a sorted
at uniq
time file
rpm Manage RPM packages cut Extract columns or fields from a file

Prepared By: Md Zahidul Islam Laku Copyright ©2023 linuxsimply.com| All rights reserved.
Oracle Linux
Cheat Sheet

System Administration File and Directory Management


yum Manage system packages paste Merge lines from multiple files
Translate or deletes characters from a
dnf Manage system packages tr
file
su Switch to another user account sed Edit a file using regular expressions
Execute commands with superuser
sudo awk Process text files and generates reports
privileges
visudo Edit the sudoers file grep Search for a pattern in a file
Search for an extended regular
id Display user and group information egrep
expression pattern in a file
Display who is logged in and what they
w fgrep Search for a fixed string pattern in a file
are doing
Display the contents of a directory in a
whoami Display the current user tree
tree-like format
View and modify system hostname
hostnamectl readlink Display the value of a symbolic link
settings
Add a directory to the directory stack
sysctl View and modify kernel parameters pushd and changes the current directory to
the new directory
ulimit View and modify user resource limits
locale View or modify locale settings Network Commands
Display or modify the system date and Display network interface configuration
date ifconfig
time information
Creates a shortcut for a longer Configure and display network
alias ip
command interfaces, routing, and tunnels
View and manipulate the IP routing
unalias Removes previously created alias route
table
Test connectivity to a network host
ping
using the ICMP protocol
Trace the network path to a remote
Process Commands traceroute
host
Display information about active Query DNS servers to retrieve domain
ps nslookup
processes on the system name or IP address information
Display real time information about
top dig Query DNS servers for DNS records
running processes
Terminate a process using its process ID Perform DNS lookups and retrieve
kill host
(PID) domain name or IP address information

Signal processes based on their name Display network connections, routing


pkill netstat
or other attributes tables, and network interface statistics
Search for processes based on their Display network sockets and related
pgrep ss
name or other attributes information

Prepared By: Md Zahidul Islam Laku Copyright ©2023 linuxsimply.com| All rights reserved.
Oracle Linux
Cheat Sheet

Process Commands Network Commands


Set the priority of a process to control Establish a connection to a remote host
nice telnet
its CPU usage using the Telnet protocol
Change the priority of an already Establish a secure shell connection to a
renice ssh
running process remote host
Terminate multiple processes based on
killall scp Securely copy files between hosts
their name
Display real-time information about
Securely transfer files between hosts
htop processes in a more interactive way sftp
using the FTP protocol
than top
Display a tree-like representation of
Transfer files to and from a remote FTP
pstree running processes and their parent- ftp
server
child relationships
Find the PID of a running process based Download files from the internet using
pidof wget
on its name various protocols
Display virtual memory statistics and Transfer data from or to a server, using
vmstat curl
other system performance metrics one of the supported protocols
Trace system calls and signals made by Perform network exploration and
strace nmap
a process and their results security auditing
Identify processes using specific files or Capture network packets and analyze
fuser tcpdump
directories network traffic
Execute a command repeatedly and Configure and manage the netfilter
watch iptables
display its output in real-time firewall and packet filtering framework
Display system uptime and load
uptime
average
Display input/output statistics for
iostat Archive Commands
devices and partitions
Collect and report system activity
sar information, including CPU, memory, tar Create and manipulate tar archives
and disk usage
mpstat Display processor related statistics tar -cf Create a tar archive file
Display system performance
nmon tar -xf Extract files from a tar archive
information in real-time
Display system resource usage and Create a compressed tar archive (also
dstat tar -zcvf
other statistics in real-time known as a .tar.gz file)
Display system resource usage and
atop other statistics in real-time with gunzip Decompress a .gz file
advanced features
Display scheduler statistics for tasks
schedstat rar Create and manipulate RAR archives
and threads
Display NUMA (Non-Uniform Memory
numastat unrar Extract files from a RAR archive
Access) statistics
Display scheduler debugging
sched_debug unzip Extract files from a ZIP archive
information

Prepared By: Md Zahidul Islam Laku Copyright ©2023 linuxsimply.com| All rights reserved.
Oracle Linux
Cheat Sheet

Process Commands Archive Commands


Compress files using the bzip2
slabtop Display kernel slab cache information bzip2
algorithm
Oracle-specific Commands gzip Compress files using the gzip algorithm
Manage Oracle Automatic Storage
asmcmd Management (ASM) instances and disk xz Compress files using the xz algorithm
groups
Manage Oracle Clusterware
crsctl p7zip Create and extract 7-Zip archives
components and resources
Create, extract and list tar, cpio, and
dbca Create and configure Oracle databases pax
pax archives
Execute commands across multiple
dcli cpio Create and extract cpio archives
Oracle database servers simultaneously

Manage Oracle Database Cloud Services Create a shell archive, which is a shell
dcsctl shar
instances script that can be used to extract files
Create and extract archives in the Unix
Export and import Oracle database
expdp ar ar format, which is typically used for
objects and data
libraries
Export and import Oracle database Creates, views, and extracts files from a
impdp zip
objects and data compressed archive file
Manage Oracle database listener
lsnrctl
services
Manage and monitor Oracle databases,
oemctl Security and Permission
middleware, and applications
Display Oracle error messages and their Change the permissions of files and
oerr chmod
meanings directories
Manage Oracle ASM devices and disk Change the owner and group of files
oracleasm chown
groups and directories
Diagnose and troubleshoot issues on Change the group ownership of files
orachk chgrp
Oracle systems and directories
orapki Manage Oracle wallets and certificates passwd Change the password of a user account
Connect to and manage Oracle Execute commands with administrative
sqlplus sudo
databases from the command line privileges
srvctl Manage Oracle services and instances useradd Create a new user account
Test the connectivity to an Oracle
tnsping usermod Modify an existing user account
database listener
userdel Delete a user account
groupadd Create a new group
groupmod Modify an existing group
groupdel Delete a group

Prepared By: Md Zahidul Islam Laku Copyright ©2023 linuxsimply.com| All rights reserved.
Oracle Linux
Cheat Sheet

Security and Permission


Set the default file permissions for new
umask
files and directories
passwd -l Lock a user account
passwd -u Unlock a user account
firewall-cmd Manage the firewall configuration
Check the status of SELinux (Security-
sestatus
Enhanced Linux)
Enable or disable SELinux enforcement
setenforce
mode
Check the current SELinux enforcement
getenforce
mode

Prepared By: Md Zahidul Islam Laku Copyright ©2023 linuxsimply.com| All rights reserved.

You might also like