Skip to content

📟 Linux Essentials

Practical linux commands used in day-to-day devops debugging sessions.

Linux & Networking Commands

File & Directory Management

  1. ls - Lists directory contents showing filenames, sizes, and permissions.
  2. cd - Changes your current working directory location.
  3. pwd - Prints the absolute path of your current directory.
  4. mkdir - Creates new directories, including nested paths if specified.
  5. rm - Deletes files or entire directories permanently from storage.
  6. cp - Copies files or complete directory structures to a new destination.
  7. mv - Moves or renames files and directories.
  8. find - Searches the filesystem for files matching specific criteria.
  9. touch - Creates empty files or updates existing file timestamps.
  10. ln - Creates shortcut links pointing to files or directories.

File Viewing & Editing

  1. cat - Displays the entire content of a file on screen.
  2. tail - Shows the end of a file and monitors live updates.
  3. head - Displays the first few lines of a file.
  4. less - Opens files for interactive, screen-by-screen scrolling and reading.
  5. grep - Searches text files for lines matching specific patterns.
  6. awk - Extracts and processes data fields arranged in columns.
  7. sed - Edits text streams to find and replace content automatically.
  8. wc - Counts the lines, words, and characters inside files.
  9. diff - Compares two files side-by-side to highlight differences.
  10. vim - Opens a powerful text editor directly inside the terminal.

Process Management

  1. ps - Snapshots and lists currently active system processes.
  2. top - Displays real-time CPU, memory, and process statistics continuously.
  3. htop - Provides an interactive, color-coded process viewer and manager.
  4. kill - Stops a running process using its unique ID number.
  5. pkill - Stops running processes based on their matching names.
  6. nohup - Keeps commands running even after you log out.
  7. bg / fg - Switches background tasks to the foreground or vice versa.
  8. jobs - Lists active tasks running in your current background session.
  9. systemctl - Controls system background services and system startup states.
  10. crontab - Schedules automation scripts to run at specific times.

Networking

  1. curl - Sends data requests to servers using internet protocols.
  2. wget - Downloads files directly from internet web links.
  3. ping - Checks if a remote computer is reachable and active.
  4. netstat - Lists network connections, routing tables, and open interface ports.
  5. ss - Offers a faster, modern utility to inspect network sockets.
  6. ssh - Establishes encrypted terminal connections to secure remote servers.
  7. scp - Copies files securely between different computers over network links.
  8. rsync - Synchronizes files efficiently between directories or network machines.
  9. traceroute - Maps the path data takes across internet routers to a host.
  10. nslookup - Queries internet domain name servers to find IP addresses.

Disk & System Monitoring

  1. df - Reports available and used storage space on filesystems.
  2. du - Calculates the storage space used by specific files or folders.
  3. free - Shows used and available physical RAM and virtual swap memory.
  4. uptime - Displays how long the system has been running continuously.
  5. uname - Prints the operating system name and kernel version details.
  6. lsof - Lists all files and network ports opened by running processes.
  7. iostat - Monitors input and output storage performance data.
  8. vmstat - Displays virtual memory, process, and system activity summaries.

Permissions & User Management

  1. chmod - Modifies access read, write, and execute permissions of files.
  2. chown - Changes the owner and group identity of files or folders.