DEV Community

Priyadarshini Chettiar
Priyadarshini Chettiar

Posted on • Edited on

3 1

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)

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

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

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay