Linux SOP
Linux SOP
Linux SOP
Process Operations
File Permissions
chmod octal filename: Changes the permissions of filename to the specified octal
value (0 to 7), where 0 means no permissions and 7 means full permissions.
chown ownername filename: Changes the owner of filename to ownername.
chgrp groupname filename: Changes the group ownership of filename to
groupname.
Networking
ping host: Sends ICMP echo requests to host and displays the results, helping to
check connectivity.
whois domain: Retrieves and displays WHOIS information for the specified domain.
dig domain: Fetches DNS information for the given domain.
netstat -pnltu: Displays various network-related information including network
connections, routing tables, and interface statistics.
ifconfig: Shows IP addresses and other details of all network interfaces.
ssh user@host: Establishes a remote login session to host as the specified user.
scp source destination: Securely transfers files between hosts over SSH.
wget url: Downloads files from the web using the specified url.
curl url: Sends a request to the url and returns the response, useful for interacting
with web services.
traceroute domain: Traces and displays the route that packets take to reach the
specified domain.
mtr domain: Combines the functionality of traceroute and ping to provide a
continuous network diagnostic tool.
ss: Investigates sockets, serving as a modern alternative to netstat.
nmap: A network exploration tool and security scanner for discovering hosts and
services on a network.
tar cf file.tar files: Creates a tar archive named file.tar containing the
specified files.
tar xf file.tar: Extracts the contents of the file.tar archive.
gzip file: Compresses file and renames it to file.gz.
gzip -d file.gz: Decompresses file.gz back to file.
zip -r file.zip files: Creates a zip archive named file.zip containing the
specified files.
unzip file.zip: Extracts the contents of the file.zip archive.
Text Processing
Disk Usage
df: Displays disk space usage for all mounted filesystems.
du: Shows the disk space usage for directories and their contents.
free: Displays memory and swap usage.
whereis app: Shows possible locations of the app executable.
System Info
Package Installations
sudo apt-get update: Updates the package lists for upgrades and new package
installations.
sudo apt-get upgrade: Upgrades all packages that have available updates.
sudo apt-get install pkgname: Installs the specified package pkgname.
sudo apt-get remove pkgname: Removes the specified package pkgname from the
system.
Environment Variables