Basic command in linux

mkdir – make directories


cd – change directories

Use cd to change directories.

Type cd followed by the name of a directory to access that directory.Keep in mind that you are always in a directory and can navigate to directories hierarchically above or below.

mv- change or rename the name of a directory Ex: mv testdir newnamedir

pwd – print working directory output will be like /var/www/

rmdir – Remove an existing directory

rm -rf /var/www/test/

-r recursively

f forcefully(i.e it will directly delete file or folder)

chown – change file owner and group

chown -r 777 /var/www/test/

cp – Copy files cp myfile yourfile

ln – Creates a symbolic link to a file.

ln -s test symlink

more – Allows file contents or piped output to be sent to the screen one page at a time

less – Opposite of the more command

cat – Sends file contents to standard output. This is a way to list the contents of short files to the screen.

cal month year – Prints a calendar for the specified month of the specified year.

clear – Clears the terminal screen.

cmp file1 file2 – Compares two files, reporting all discrepancies.

diff file1 file2 – Compares two files, reporting all discrepancies. Similar to the cmp command, though the output format differs.

free – Displays the amount of used and free system memory.

ftp hostname

kill process_ids

killall program

mail – Launches a simple mail client that permits sending and receiving email messages. reboot – Reboots the system (requires root privileges).

shutdown minutes

shutdown -r minutes

top – Prints a display of system processes that’s continually updated until the user presses the q key.


About Kapil Chugh

In love with PHP and tweaking WordPress. Hungry for Open Source and new technologies. Honest. God-fearing. Happiest when solving problems.
This entry was posted in Ubuntu and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s