DEV Community

Priyadarshini Chettiar
Priyadarshini Chettiar

Posted on • Edited on

Some important Linux Commands for Devops

Today I'm going to share some of the important linux commands that you will be using as a Devops Engineer

So, lets get started

  1. cat /etc/os-release -> To get the OS details (eg. name,version etc)

  2. ps aux | grep "process_name" -> To get the process owner details ( eg. ps aux | grep "jenkins" )

  3. cut -d: -f1 /etc/passwd -> To get the all the users list

  4. lsblk -> To get all the list of block devices mapping

  5. df -h -> To get the filesystem details

  6. uname -a-> To get the OS name, machine name and kernal

  7. wget https://... -> To download files from the web.

  8. ifconfig -> To check the network interfaces

  9. netstat -a -> To list all network ports, routing tables, sockets and connection details

  10. apt list --installed -> To check the installed packages ( eg. apt list apache2 -> To check apache2 related packages)

  11. apt list | grep nginx -> To check if ngnix is installed

  12. dpkg --list | grep nginx -> To check the installed packages

  13. cat /etc/services | less -> To check the open ports

  14. netstat -atu -> To check the open tcp ports

  15. netstat -lntup -> To check the open tcp as well as udp ports that are listening along with their process ids

  16. lsof -i 4 -a -p <Process-Number> -> for listing open files related to processes ( 4 implies ipv4, -a is used for Anding the output, -p is used to specify the process id we wish to check)

Top comments (0)