Use sudo

1. when you forget to run a command with sudo, instead of retyping the command you could use
# to run the last command in history with sudo
sudo !!
# or you could use if you prefer
sudo !-1
# run the second to the last command in the history with sudo
sudo !-2 
2. To have an interactive shell as root:
sudo -i
# or
sudo su -
3. when you use vim and forget to type sudo
:w !sudo tee %

A command line tool to record your terminal activity

Script is a simple command line tool to record your terminal activity, including your command history and outputs of the commands, basically everything showed on the terminal screen.
To use it
script [file_name]
#or
script
By type this command, script will create a typecript file at your current directory if you do not provide a file name in the command.
After finished, execute exit to save your command history and outputs.

Obtain IP address of Linux

Two commands used to obtain ip address of linux machine:
#set 1
#displays all cuurentlly active network interfaces
/sbin/ifconfig
# IP address in the output of this command is you IP
/sbin/ifconfig eth0 | grep 'inet addr:'
#set 2
/sbin/ip addr list
/sbin/ip addr list eth0

Restore CentOS top panel

Have you ever messed up top panel of your CentOS?
Here is a way to restore it to it's default.
sudo mv ~/.gconf/apps/panel ~/.gconf/apps/panel.bak
sudo reboot

Disable system beep for CentOS

Here is way to disable the system beep for CentOS
# unloading the pcspkr module: 
rmmod -v pcspkr
In addition, add the following line in /etc/rc.d/rc.local file to automatic disable it during boot.
/sbin/rmmod pcspkr
if you ever want to re-enable the speaker, run the following command:
/sbin/modprobe pcspkr

Copy files between Linux Systems using scp

1. Copy file from a remote server to local server: copy directory pathogenbase from remote server /srv/www/ directory to current working directory

scp -r user_name@remote_ip:/srv/www/pathogenbase/ .
2. Copy file_name from local server to remote server: copy file_name from /srv/www on local server to remote server /srv/www/
scp /srv/www/file_name user_name@remote_ip:/srv/www/
3. If you are copying files between windows and Linux you could use winSCP.

Eclipse and CentOS

1. install
$ sudo yum groupinstall Eclipse
2. configuration

3. install Django
$sudo pip install django
4. install PyDev: use eclipse install new software feature by adding http://pydev.org/updates

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...