This command is used to change your current directory, this command will accept both absolute and relative paths as below example (consider you are in your home directory):
cd /home/bob/Desktop
Or
cd Desktop
Move (mv)
This command is used to move a file to a different location or rename it as the below example:
Moving:
mv /home/bob/test /home/bob/Desktop/test
Renaming:
mv /home/bob/test /home/bob/test2
The ls command is used to list the folders and file inside a directory, most people use this command with the -a & -l options, -a will display hidden files and -l for long listing format, the below output is for the ls -al command:
drwx------ 4 501 502 4096 Mar 21 10:39 .
drwxr-xr-x. 5 root root 4096 Oct 1 11:10 ..
-rw-r--r-- 1 501 502 18 Dec 2 2011 .bash_logout
-rw-r--r-- 1 501 502 176 Dec 2 2011 .bash_profile
-rw-r--r-- 1 501 502 124 Dec 2 2011 .bashrc
-rw-r--r-- 1 501 502 500 Jan 23 2007 .emacs
-rw-r--r-- 1 root root 0 Mar 21 10:39 file
drwxr-xr-x 2 501 502 4096 Nov 12 2010 .gnome2
drwxr-xr-x 4 501 502 4096 Jan 24 2012 .mozilla
Make Directory (mkdir)
This command is used to create a directory as the below example:
mkdir /home/bob/newfolder
Remove directory (rm)
This command is used to remove files and directories, to remove directories that contains files or folder you need to a add -r &-f options, the -r for recursive and -f for force as below:
rm -rf /home/bob/folder
Super user do (sudo) & Switch user (su)
The sudo command is used to run commands as the root user and the su command is used to change user as the below commands:
sudo service httpd restart //restart the service as root
su bob //switch the current user to bob
apt-get & yum
apt-get and yum commands are used to install or update packages, apt-get is used in Debian based distributions like Ubuntu and Mint, yum is used in the Redhat based distributions like Fedora and CentOS, they are used as the below example:
apt-get install Package-Name
yum install Package-Name
World Wide Web and get (wget)
This command is used to download files from http or ftp servers, you can resume a downloading file using -c option as the below example:
wget http://path-to-the-file //download a file
wget -c http://path-to-the-file //resume a download file
top
The top command provides a real-time view of the running system or server, the below is sample of the output of this command:
RSS Feed