0% found this document useful (0 votes)
4 views1 page

Essential Linux Command Cheat Sheet

The document provides a list of basic command line operations for file and directory management in a Unix-like operating system. It includes commands for navigating directories, creating and removing files and directories, and executing shell scripts. Each command is accompanied by a brief description of its function and usage.

Uploaded by

yogeshpandiyan19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Essential Linux Command Cheat Sheet

The document provides a list of basic command line operations for file and directory management in a Unix-like operating system. It includes commands for navigating directories, creating and removing files and directories, and executing shell scripts. Each command is accompanied by a brief description of its function and usage.

Uploaded by

yogeshpandiyan19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

To Know the path: pwd


2. To list the files: ls
3. To show the file details: ls -l
4. To create directory: mkdir dir1(name of the directory)
5. To change directory: cd (name of the directory)
6. To go back to home directory: cd ..
7. For navigating to root directory: cd /
8. To go to required directory from root directory: cd ~/ (name of the
directory)
9. Create text file: nano [Link]
->hello world
->exit(ctrl x)
->save(Y)
[Link] open file: cat [Link]
[Link] rename file: mv [Link] [Link]
->ls
-> cat [Link]
[Link] copy one file to another: cp [Link] [Link]
->ls
->cat [Link]
->cat [Link]
[Link] clear :clear
[Link] Remove file: rm [Link]
->ls
[Link] Remove director
a. cd .. (first move back to home)
b. rmdir (directory name)
c. ls
Note: directory cannot be deleted if its not empty
[Link] remove directory including files
->rm -R (name of the directory)
[Link] list all files in directory: ls -a
[Link] create shell script: nano (file_name).sh
[Link] grant permission: chmod +x (file_name).sh
[Link] Run(execute): ./(file_name).sh

You might also like