If you're just getting started with CentOS, learning the commands and tools is a big help in increasing your productivity. In this blog, we go over some of the most useful CentOS commands and tools as chosen by our enterprise architects, then provide a list of common commands.
There are lots of commands when it comes to CentOS and any tool that saves time and provides utility is a welcome addition to any person’s tool kit.
We asked several of our enterprise architects on the team what their favorite tools and commands were and here are some of the results:
The command top displays a list of processes or threads currently being used by the system kernel. This is useful for telling if something is holding up your systems resources. Summary is the first portion you’ll see followed by the fields and columns header and then the task area. You would use this to determine if a process is hung or hogging all the resources of your system prior to simply killing a pid at random.
Have you ever wondered from a networking perspective, what ports were open on various nodes of your network? Nmap allows you to quickly scan networks for open ports, application version information, running services, what operating system and version, what type of packet filters and firewalls are in use, and plenty of other useful and sensitive information. By listing information such as what ports are open, you can then seal the gaps in your security plan by closing those ports if possible. Nmap is a robust tool and the man pages are a highly recommended read to understand all the options and features available.
Have you ever wondered the easiest way to find all the files associated with a particular package? These two commands will show all the files and their location of the package named. Rpm is for RHEL/CentOS and dpkg is for Debian based systems.
One of the commands we frequently have our customers run during break/fix issues is sosreport. It creates an archive of config and diagnostic data from the system to be used for debugging and troubleshooting later. Can be used with xsos, a tool used to read the reports generated by sosreport.
This command arranges and formats the output of modules in /proc/modules and any kernel modules that are currently loaded.
An incredibly useful tool that allows you to examine the content of packets on a network interface matching a Boolean expression. This includes such information as handshakes between two devices, logins to sites, server traffic, UDP traffic, requests to printers, but more importantly it can detect traffic going to sketchy destinations or from unknown sources. Has a GUI version known as Wireshark.
Moving From RHEL to CentOS?Watch this on-demand webinar to see a walkthrough of the process.
Watch this on-demand webinar to see a walkthrough of the process.
While our list above is useful, there are many more commonly-used CentOS commands for Linux that you should keep close by. Here are some that make working from the command line a lot easier.
Want a one-page PDF version of the shortcuts above? Click the link below to download the cheat sheet!
Download Cheat Sheet
In conclusion, CentOS is filled with tons of tools and utilities, the aforementioned are just among some of the many available. www.man7.org has manual pages for these, and many more commands and all the usable options that go along with them.
OpenLogic offers groundbreaking CentOS support and services. We can help you migrate to CentOS and maximize it for your enterprise.
With OpenLogic's CentOS Linux support, you'll get:
Talk to an expert today to learn how we can help you with CentOS.
Talk to a CentOS Expert
Looking for additional information on CentOS? Be sure to check out the resources below!
Associate Enterprise Architect, OpenLogic by Perforce
Andrew's areas of specialization include networking, Linux, network security including OpenSSL, and operational troubleshooting. He has been working in the industry for over seven years and is acquiring new skills every day.