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

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...