DEV Community

Cover image for Linux Commands for DevOps Professionals🚀
DevOps Descent
DevOps Descent

Posted on • Edited on

16 4 3 3 3

Linux Commands for DevOps Professionals🚀

Linux Commands for DevOps Professionals

  1. id - Find user and group names and numeric IDs (UID or group ID) of the current or any other user.
    Example: id -u root

  2. cd - Change Directory: Navigate to a different directory.
    Example: cd /home/user/documents

  3. pwd - Print Working Directory: Display the current directory's full path.
    Example: pwd

  4. mkdir - Make Directory: Create a new directory.
    Example: mkdir new_folder

  5. rm - Remove: Delete files or directories.
    Example: rm file.txt

  6. cp - Copy files or directories.
    Example: cp file.txt /backup

  7. mv - Move files or directories.
    Example: mv file.txt /new_location

  8. touch - Create an empty file.
    Example: touch new_file.txt

  9. cat - Concatenate and display file content.
    Example: cat file.txt

  10. nano - Text editor: Open a text file for editing.
    Example: nano file.txt

  11. grep - Search for text patterns in files.
    Example: grep "pattern" file.txt

  12. find - Search for files and directories.
    Example: find /path/to/search -name "file_name"

  13. chmod - Change file permissions.
    Example: chmod 755 file.sh

  14. chown - Change file or directory ownership.
    Example: chown user:group file.txt

  15. ps - Display running processes.
    Example: ps aux

  16. top - Monitor system processes in real-time.
    Example: top

  17. kill - Terminate processes by ID. Use pkill to terminate by name.
    Example: kill PID

  18. wget - Download files from the internet.
    Example: wget https://example.com/file.zip

  19. less - View file content one screen at a time.
    Example: less test.log

  20. tar - Archive and extract files.
    Example: tar -czvf archive.tar.gz folder

  21. ssh - Securely connect to a remote server.
    Example: ssh user@remote_host

  22. scp - Securely copy files between local and remote systems.
    Example: scp file.txt user@remote_host:/path

  23. rsync - Synchronize files and directories between systems.
    Example: rsync -avz local_folder/ user@remote_host:remote_folder/

  24. df - Display disk space usage.
    Example: df -h

  25. du - Show the size of files and directories.
    Example: du -sh /path/to/directory

  26. ifconfig - Network configuration (deprecated, use ip).
    Example: ifconfig

  27. ip - Manage IP addresses and network settings.
    Example: ip addr show

  28. netstat - Display network connections (deprecated, use ss).
    Example: netstat -tuln

  29. systemctl - Manage system services.
    Example: systemctl start service_name

  30. journalctl - View system logs.
    Example: journalctl -u service_name

  31. free - Display the total amount of free space.
    Example: free -m

  32. at - Run commands at a specified time.
    Example: echo "command" | at 15:30

  33. ping - Check network connectivity to a host.
    Example: ping google.com

  34. traceroute - Trace the route packets take to reach a host.
    Example: traceroute google.com

  35. curl - Check website connectivity.
    Example: curl -Is https://example.com | head -n 1

  36. dig - Retrieve DNS information for a domain.
    Example: dig example.com

  37. hostname - Display or set the system's hostname.
    Example: hostname

  38. who - Display currently logged-in users.
    Example: who

  39. useradd - Create a new user account.
    Example: useradd newuser

  40. usermod - Modify user account properties.
    Example: usermod -aG groupname username

  41. passwd - Change user password.
    Example: passwd username

  42. sudo - Execute commands as the superuser.
    Example: sudo command

  43. lsof - List open files and processes using them.
    Example: lsof -i :port

  44. nc - Networking utility to read and write data.
    Example: echo "Hello" | nc host port

  45. sed - Text manipulation using regex.
    Example: sed 's/old/new/g' file.txt

  46. awk - Pattern scanning and text processing.
    Example: awk '{print $2}' file.txt

  47. cut - Extract specific columns from text.
    Example: cut -d"," -f2 file.csv

  48. sort - Sort lines of text files.
    Example: sort file.txt

  49. diff - Compare files line by line.
    Example: diff file1.txt file2.txt

Support if you found this helpful😉

No Money 🙅🏻‍♀️ just Subscribe

Do check: https://linktr.ee/DevOps_Descent
Youtube: https://shorturl.at/lVi2G

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (4)

Collapse
 
kiran_baliga profile image
Kiran Baliga

Thank you

Collapse
 
devops_descent profile image
DevOps Descent

Happy to help 😊

Collapse
 
rahul_umesh_7bbd783554e21 profile image
Rahul Umesh

quick glance of all commands, thank you!!

Collapse
 
devops_descent profile image
DevOps Descent

😊😊

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more