top of page
  • natemk

LINUX: Linux CLI commands

Updated: Apr 23, 2022

  1. pwd - Gives the current working directory

  2. whoami - Prints the current user

  3. cd(directoryName) - Changes directory.

  4. cd .. - go back to the parent directory

  5. ls - View all contents of a directory.

  6. clear - Clears the terminal log

  7. cp(file) - Copies files from the current directory to another directory

  8. mv(file)location - Moves files from the current directory to a different directory.

  9. mv(file)newName - Rename files

  10. mkdir(directoryName)- Creates new directory(s)

  11. rmdir(directoryName)- Remove empty directory

  12. rm -r(directoryName)- Deletes directory with content

  13. rm(file) - Deletes directories and files

  14. touch(file) - Creates empty files

  15. cat(fileName) - reads the specified file

  16. tac (fileName) - reads the specified file in reverse

  17. locate(file) - finds a file

  18. tree - lists the files in the current

  19. find (file)- Searches for files in a directory

  20. vi (file) - edit file in the terminal

  21. gedit (file) - edits the file in text editor

  22. nano(file) - edit file in nano editor

  23. sudo - Performs tasks with admin permission

  24. df - Gets report on system's disk space

  25. du - Checks how much space a file takes

  26. head - Views the first line of a file.

  27. tail - Views the last line of a file.

  28. chmod - Changes permission of a file

  29. x execute

  30. w write

  31. r read

36 views0 comments

Recent Posts

See All

Comments


bottom of page