Most Commonly Used Linux Command

ยท

2 min read

Most Commonly Used Linux Command
  1. pwd: Print the current working directory.

  2. ls: List the files and directories in the current directory.

    • To list hidden files, use ls -a.
  3. cd: Change the current directory.

    • To go to the home directory, use cd ~.

    • To go up one directory, use cd ...

  4. mkdir: Create a new directory.

    • For example, mkdir my_directory will create a directory named "my_directory".
  5. touch: Create an empty file.

    • For example, touch my_file.txt will create a file named "my_file.txt".
  6. rm: Remove files or directories.

    • To remove a file, use rm filename.

    • To remove a directory and its contents, use rm -r directoryname (be careful with this command).

  7. cp: Copy files or directories.

    • To copy a file, use cp source file destination.

    • To copy a directory and its contents, use cp -r source directory destination.

  8. mv: Move or rename files or directories.

    • To move a file or directory, use mv source destination.

    • To rename a file or directory, use mv oldname newname.

  9. cat: Display the contents of a file.

    • For example, cat my_file.txt will display the contents of "my_file.txt".
  10. grep: Search for text within files.

    • For example, grep "search_term" filename will search for "search_term" in "filename".
  11. man: Access the manual pages for a command.

    • For example, man ls will display the manual for the ls command.
  12. ps: List running processes.

    • ps aux will display a list of all running processes.
  13. kill: Terminate a process.

    • Use kill process_id to send a signal to a process to stop it.
  14. chmod: Change file permissions.

    • For example, chmod 755 myfile will give read, write, and execute permissions to the owner and read and execute permissions to others.
  15. chown: Change file ownership.

    • For example, chown user:group myfile will change the owner and group of "myfile."

Day 3 of #90DaysOfDevOps ( Basic Linux Command )

hope you liked it .......


#DevOps #Cloud #90DaysOfDevOps

#linux #Linux #DevOps #linux #cloud #LinuxVsWindows

#operatingsystem #90daysofdevops #tws

ย