Explain basic shell commands.

0131

Basic shell commands are fundamental commands used in a command-line interface to perform various tasks. Here are some of the most common ones:

  1. pwd:

    • Stands for "print working directory."
    • Displays the current directory you are in.
  2. ls:

    • Lists files and directories in the current directory.
    • Options like -l (long format) and -a (include hidden files) can be used.
  3. cd:

    • Stands for "change directory."
    • Used to navigate between directories. For example, cd /path/to/directory.
  4. mkdir:

    • Stands for "make directory."
    • Creates a new directory. For example, mkdir new_folder.
  5. rm:

    • Stands for "remove."
    • Deletes files or directories. Use -r for recursive deletion of directories.
  6. cp:

    • Stands for "copy."
    • Copies files or directories. For example, cp source.txt destination.txt.
  7. mv:

    • Stands for "move."
    • Moves or renames files or directories. For example, mv oldname.txt newname.txt.
  8. echo:

    • Displays a line of text or the value of a variable.
    • Example: echo "Hello, World!".
  9. cat:

    • Concatenates and displays the content of files.
    • Example: cat file.txt.
  10. man:

    • Displays the manual page for a command.
    • Example: man ls shows the manual for the ls command.

These commands form the basis of interacting with the shell and performing file management and navigation tasks.

0 Comments

no data
Be the first to share your comment!