Any other useful Linux commands?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 30 2025
0152

Certainly! Here are some useful Linux commands that can help you manage files, directories, and system information:

  1. List Files and Directories:

    ls

    Use ls -l for detailed information and ls -a to include hidden files.

  2. Copy Files:

    cp source_file destination
  3. Move/Rename Files:

    mv old_name new_name
  4. Remove Files:

    rm filename

    Use rm -r directory_name to remove a directory and its contents.

  5. Create a Directory:

    mkdir directory_name
  6. Change File Permissions:

    chmod permissions filename
  7. View File Contents:

    • Use cat filename to display the entire file.
    • Use less filename or more filename for paginated viewing.
  8. Search for Text in Files:

    grep 'search_term' filename
  9. Find Files:

    find /path/to/search -name 'filename_pattern'
  10. Display Disk Usage:

    df -h
  11. Check Memory Usage:

    free -h
  12. View Running Processes:

    ps aux

    Use top or htop for a dynamic view of processes.

  13. Download Files:

    wget http://example.com/file
  14. Archive and Compress Files:

    • Create a tarball:
      tar -cvf archive_name.tar directory_name
    • Extract a tarball:
      tar -xvf archive_name.tar
  15. Check System Information:

    uname -a

These commands are fundamental for navigating and managing a Linux system effectively.

0 Comments

no data
Be the first to share your comment!