Day - 9 of DevOps

Day - 9 of DevOps

Linux System Administration Commands - Part 3

  1. ip addr show / ifconfig:

    • ip addr show: Displays network interfaces and their IP addresses using the ip command.

    • ifconfig: A legacy command used for similar purposes. Modern Linux systems often use ip instead.

  2. route -n:

    • Displays the routing table, showing the routes to different network destinations.

  3. netstat -tulpn:

    • Lists active network connections and listening sockets along with the associated processes using the netstat command.

  4. nslookup / dig:

    • nslookup: A command-line tool for querying Domain Name System (DNS) servers to obtain domain name or IP address information.

    • dig: Another DNS query tool, providing more detailed information than nslookup.

  5. ping / ping -i 5 google.com:

    • ping: Sends ICMP echo requests to a network host to check its availability.

    • ping -i 5 google.com: Sends ping requests to "google.com" every 5 seconds.

  6. ctrl+z, ctrl+c, ctrl+d, ctrl+x:

    • Keyboard shortcuts used in the terminal:

      • ctrl+z: Suspends the currently running process.

      • ctrl+c: Interrupts or terminates the currently running process.

      • ctrl+d: Signals the end-of-file.

      • ctrl+x: Varies by application; in some text editors, it might cut text.

  7. ps -T, ps -aux, ps -ef - system all process:

    • ps -T: Displays information about processes and their threads.

    • ps -aux / ps -ef: Provides a detailed list of all processes, including user, CPU usage, and more.

  8. fg:

    • Brings a background process to the foreground. Useful after using ctrl+z to suspend a process.

  9. sleep:

    • Delays the execution of a script or command for a specified amount of time. Useful for creating delays in scripts.