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)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

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

Okay