Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.44 KB

File metadata and controls

49 lines (31 loc) · 1.44 KB

Basic Linux Commands

Linux often uses the Command Line Interface (CLI) instead of a Graphical User Interface (GUI) for tasks that require speed, automation, and precise control. While GUIs are easy to use, they can be slower, use more computer resources, and might not have all the advanced features you need. The CLI lets you run tasks faster, automate things that you do often, and manage systems from a distance using SSH.

Essential Linux Commands

1️⃣ Navigation Commands

These commands help you move between different folders (directories) and see the files inside them.

  • pwd → Shows you the directory you are currently in.

    pwd
    /home/user
    
  • ls → Lists all the files and folders in the current directory.

    ls
    
  • ls -l → Shows you detailed information about the files and folders, like who has permission to do what, how big they are, and who owns them.

  • ls -a → Shows you all files, including hidden ones (files that start with a .).

  • cd [directory] → Changes your current directory to the one you specify.

    cd Documents
    
  • cd .. → Moves you up one level in the directory structure (to the parent directory).

    cd ..
    
  • cd / → Takes you directly to the root directory of the system.

📌 Example:

Move to the /var/log directory and list files in a human-readable format:

cd /var/log
ls -lh