
About Information :
date : show the current date and time
cal : show this month's calendar
uptime : show the current uptime
w : display who is online
whoami : who you arelogget in as
finger < user > : display information about user
uname -a : show kernel information
cat /proc/cpuinfo : cpu information
cat /proc/meminfo : memory information
free -m : memory and swap usage in MB
df -h : show disk usage (human readable)
whereis <app> : show possible location of app
which <app> : show which app will be run by default
file <file> : show type of file
man <command> : show the manual for command
About Networking
ping <host> : ping host and output results
whois <domain> : get whois information for domain
dig <domain> : get dns information for domain
dig -x <host> : reverse lookup host
wget <file> : download file
create ip address on ethernet :
ifconfig eth0 <ip> <netmask> set ip and netmask in first network interface
route add default gw <ip gateway> set ip gateway
About Installation package
Install from source :
./configure
make && make install
dpkg -i <package .deb> : install a package debian
aptitude install <package> : install package from repository (debian/Ubuntu)
aptitude remove <package> : remove a package (debian/ubuntu)
aptitude update : update ubuntu
aptitude upgrade : upgrade ubuntu
About Compression package :
tar cf <file.tar> <files> : Create a tar named file .tar containing files
tar xf <file.tar> : extract the files from file.tar
tar czf <file .tar.gz> <files> : Create a tar with Gzip
tar Xzf <file.tar.gz> : extract a tar using Gzip
tar cjf <file.tar.bz2> <files> : Create a tar with Bzip2
tar xjf <fil.tar.bz2> : Extract a tar using Bzip2
gzip <file> : compresses file to file.gz
gzip -d <file.gz> : Decompresses file.gz back to file
File Commands
ls : directory listing
ls -a : listing with hidden files
ls -l : listing with attributes
cd : change to home
cd <dir> : change to directory
pwd : show current directory
mkdir <dir> : create a directory
rm <file> : delete file
rm -r <dir> : delete directory
rm -f <file> : force remove file
rm -rf <dir> : force remove directory
cp <file> <file2> : copy file to file2
cp -r <dir><dir2> : copy dir to dir2
ln -s <file> <link> : create symbolic link to file
more <file> : output the contents of file
File Permissions
chmod <octal> <file> : change the permissions of the file to octal, wich can be found separately for user, group, and world by adding
* 4 : read (r)
* 2 : write (w)
* 1 : execute (x)
Examples:
chmod 777 : read, write, execute for all
chmod 755 : rwx for owner, rx for group and world





