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
cat /etc/os-release
-> To get the OS details (eg. name,version etc)ps aux | grep "process_name"
-> To get the process owner details ( eg.ps aux | grep "jenkins"
)cut -d: -f1 /etc/passwd
-> To get the all the users listlsblk
-> To get all the list of block devices mappingdf -h
-> To get the filesystem detailsuname -a
-> To get the OS name, machine name and kernalwget https://...
-> To download files from the web.ifconfig
-> To check the network interfacesnetstat -a
-> To list all network ports, routing tables, sockets and connection detailsapt list --installed
-> To check the installed packages ( eg.apt list apache2
-> To check apache2 related packages)apt list | grep nginx
-> To check if ngnix is installeddpkg --list | grep nginx
-> To check the installed packagescat /etc/services | less
-> To check the open portsnetstat -atu
-> To check the open tcp portsnetstat -lntup
-> To check the open tcp as well as udp ports that are listening along with their process idslsof -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)