0% found this document useful (0 votes)
9 views3 pages

Document

Uploaded by

Sajal Raj
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)
9 views3 pages

Document

Uploaded by

Sajal Raj
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
You are on page 1/ 3

Commands:

1. Pwd - print current working directory (root, this is the default working directory, depends on the name
given when you download the linux platform)
2. mkdir name_of_directory - you should write the name of the directory/folder in the space. It inputs the
user defined name.
3. ls - type ls then press enter to list out the files in the directory. There are three variations of the. List
command.
4. cd name_of_directory - change directory.
5. cd .. - to go from the current directory to the previous directory. Going to immediate parent directory.

6. “cd - ” - to show which directory was used before the current running directory.

7. cd - go back to the root directory / folder.


8. cat > os.txt - (cat > file_name.extension) is the command to create
the file that is present inside a directory/folder.
9. control + d - save the file and come out of the file.
10. cat file_name.extension - display the file content but not opening
the file.
11. cat file_name.extension file_name2.extension >
file_name3.extension - this way you have combines file name and
file_name2 and these have been included in the third file,
file_name3.extension.

12. cp file_name.extension /new_directory_address - makes a copy of the file mentioned in the directory
mentioned.
13. mv file_name.extension /new_directory_address - moves the file form the directory it is in to the
directory mentioned.
14. ls -R - lists out all the files in all directories and sub-directories in the project.

15. ls -al - mode followed by root folder, parent folder, when it was created, and such. Complete info
about the file is provided.

16. find / file_name - If you are inside a directory and you want to find if there is any file with a particular
name
17. df - info about disc space for all the files. (Command given in root directory)
18. du - disc space utilisation for the entire system. (Command given in root directory)
19.df -m - the size is displayed in megabytes.
(Command given in root directory)
20. rmdir name_of_directory - Make sure that there are no other files / subdirectories are present then only
this command works.
21. rm file_name.extension - delete everything no matter what is there inside.

22. control + c - stop an unending ongoing command.


23. Locate
24. Head
25. Tail
26. grep
27. Touch
28. sudo
29. chmod
30. chown
31. Kill

You might also like