How to use basic terminal commands?

0154

Here are some examples of how to use basic terminal commands:

  1. pwd: To display your current directory.

    pwd
  2. ls: To list the contents of the current directory.

    ls
  3. cd: To change to a different directory. Replace directory_name with the name of the directory you want to access.

    cd directory_name
  4. mkdir: To create a new directory. Replace new_directory with the desired directory name.

    mkdir new_directory
  5. rm: To remove a file. Replace file_name with the name of the file you want to delete.

    rm file_name
  6. cp: To copy a file. Replace source_file with the file you want to copy and destination_file with the name of the new file.

    cp source_file destination_file
  7. mv: To move or rename a file. Replace old_file_name with the current file name and new_file_name with the desired name.

    mv old_file_name new_file_name
  8. echo: To display text in the terminal.

    echo "Hello, World!"
  9. cat: To view the contents of a file. Replace file_name with the name of the file.

    cat file_name
  10. man: To view the manual for a command. Replace command_name with the command you want to learn about.

    man command_name

These commands form the foundation for navigating and managing files in a Linux environment.

0 Comments

no data
Be the first to share your comment!