Checking kernel & CentOS version
To check which kernel version you are running use
# uname -r
To find out which CentOS (or RedHat) release is installed have a look at
# cat /etc/redhat-release
Checking Disk Space
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 /
Configuring DNS Settings
To configure which DNS servers your Linux server will use you need to edit
# vi /etc/resolv.conf
Just add each name server as a new line as in the following example:
Changing the hostname
You’ll find the hostname of the server in two places:
# vi /etc/hosts
# vi /etc/sysconfig/network
Show Processor & Memory Usage
This is equivilant to the Windows Task Manager, and will show each process and the consumed CPU and RAM usage. Very useful!
Show Processor Information
This command will display the processor type and speed.
# cat /proc/cpuinfo
Search command history for old commands you have forgotten!
Use the history command with
grep to find previously entered commands.
# history | grep command
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Updating virtusertable.db from /etc/mail/virtusertable
# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
Saving IPTABLES to /etc/sysconfig/iptables
# iptables-save > /etc/sysconfig/iptables