In most cases I rarely forgot some shell commands as they are too many to remember and linux is not my everyday work, so here below are some common commands, please note that this is for my own referense only and does not contains complete list of commands, hopefully it will be usefull to you or if you want to add more comands you can just use the facebook comments from provided on the bottom of this page.

Restart the System

# /sbin/reboot
# /sbin/shutdown -r now

to uninstall go to directory where you run the make install
make uninstall

To list the installed software type

rpm -qa | less
rpm -qa {software-name}
yum list | less
yum list {software-name}

To remove a software use rpm or yum command as follows

rpm -e {software-name}
yum remove {software-name}

check port used and who is listening
netstat -tnlp

for rerouting on linux iptables

iptables -A PREROUTING -t nat -p tcp -d --dport 80 -j REDIRECT --to-port 8064

Disable firewall or iptables  (RHEL (Redhat), Fedora core or Cent os Linux)
# service iptables save
# service iptables stop
# chkconfig iptables off

remove user: (this will also remove user home folder)

userdel -r [user]

check linux OS version

cat /proc/version
cat /etc/issue

WHM Manual run backup using the pre configured backup settings on WHM panel

# /scripts/cpbackup --force


Tar/UnTar Files on the server

tar czvf /backup.tar.gz *      // this will compress all files located on the current folder to backup.tar.gz

tar xzvf /backup.tar.gz        // this will uncompress all files from backup.tar.gz

Back up a mysql Database

mysqldump -uroot -p DB_NAME > db_backup.sql    //this will backup DB_NAME to db_backup.sql using root account

cat db_backup.sql | mysql -uroot -p DB_NAME    // this will restore the database from db_backup.sql file

Change Owner of a certain folder

chown -R centovacast.centovacast /home/centovacast/vhosts   // this will change the owver of vhost folder to centovacast