05 Jul 2005 by rayheffer
To check which kernel version you are running use uname -r
# uname -r
To find out which CentOS (or RedHat) release is installed have a look at /etc/redhat-release
To check disk space used / free use the df command and it will display each volume. The -h switch turns the bytes reading into GB to make it more readable.
# df -h
If you want to check the size of a particular directory then use:
# du -sh /
To configure which DNS servers your Linux server will use you need to edit /etc/resolv.conf
# vi /etc/resolv.conf
Just add each name server as a new line as in the following example:
You’ll find the hostname of the server in two places: /etc/hosts and /etc/sysconfig/network.
# vi /etc/hosts
# vi /etc/sysconfig/network
This is equivilant to the Windows Task Manager, and will show each process and the consumed CPU and RAM usage. Very useful!
This command will display the processor type and speed.
# cat /proc/cpuinfo
Use the history command with grep to find previously entered commands.
# history | grep command
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
# iptables-save > /etc/sysconfig/iptables
Comments are closed for this post.