NAVIGATING UNIX/LINUX TERMINAL

The Unix/Linux terminal (also known as the command line or shell) is a powerful text-based interface that allows users to interact with the operating system directly. Through simple commands, you can manage files, install software, automate tasks, and execute scripts efficiently. It is an essential tool for bioinformatics, system administration, and development.

15 Simple Terminal Commands for Beginners

  1. 1. pwd – Print Working Directory

    Displays the full path of the current directory you are in.

    pwd

     

    2. ls – List Files and Directories

    Lists the files and folders in the current directory.

    ls           # Basic listing

    ls -l        # Detailed view with permissions, size, and date

    ls -a        # Includes hidden files

     

    3. cd – Change Directory

    Used to navigate between directories.

    cd /home/user/Documents   # Move to a specific directory

    cd ..                     # Move up one directory level

    cd ~                      # Return to the home directory

     

    4. mkdir – Make Director

    Creates a new folder or directory.

    mkdir new_folder

     

    5. rmdir / rm -r – Remove Directory

    Deletes a directory.

    rmdir empty_folder        # Removes an empty directory

    rm -r folder_name         # Removes a non-empty directory recursively

     

    6. cp – Copy Files or Directories

    Copies files or entire folders to a new location.

    cp file1.txt file2.txt          # Copy a file

    cp -r folder1/ folder2/         # Copy a folder and its contents

     

    7. mv – Move or Rename Files

    Moves files to a new location or renames them.

    mv oldname.txt newname.txt      # Rename a file

    mv file.txt /home/user/Desktop  # Move a file to another directory

     

    8. rm – Remove Files

    Deletes files permanently from the system.

    rm file.txt

    rm *.txt     # Remove all text files in a directory

     

    9. cat – View File Content

    Displays the content of a text file.

    cat filename.txt

     

    10. head / tail – View Sections of a File

    Shows the beginning or end of a file.

    head filename.txt      # Display first 10 lines

    tail filename.txt      # Display last 10 lines

     

    11. grep – Search Text Patterns in Files

    Finds specific text or patterns in files.

    grep "keyword" file.txt             # Search for a keyword

    grep -r "sequence" /home/user/data  # Recursive search in a directory

     

    12. find – Locate Files

    Searches for files or directories by name or type.

    find /home/user -name "*.fasta"    # Find all FASTA files

     

    13. chmod – Change File Permissions

    Grants or restricts file access and execution permissions.

    chmod +x script.sh     # Make a script executable

     

    14. history – Display Command History

    Shows the list of recently executed commands.

    history

     

    15. man – Access Manual Pages

    Displays detailed documentation for any terminal command.

    man ls

    man awk

Comments

Popular posts from this blog

BLAST ON UNIX/LINUX TERMINAL

TREATMENT OF SEQUENCES

WELCOME TO BIOINFO DATA BLOQ CODEQUEST