Linux - CMD

Changing Directory

To go to root directory(Home Folder)

[~]$ cd


To go to a specific directory

[~]$ cd directoryName

Copy File

[~]$ cp sourceDirectory destinationDirectory

Create Directory

[~]$ mkdir directoryName

Create File

[~]$ vi fileName


Press ESC and type :wq to save and quit.

Delete Directory With File

[~]$ rm -r directoryName

Delete File

[~]$ rm fileName

Display Directory List

[~]$ ls

Moving File

[~]$ mv sourceDirectory destinationDirectory

Remove Directory

[~]$ rmdir directoryName

Rename File

[~]$ mv oldFileName newFileName

To Obtain Help

Reference manual which gives list of options

[~]$ man ls


More descriptive user guide

[~]$ info ls


Short description of its main options

[~]$ ls --help


View the content of file

[~]$ less fileName


Press q to quit.