ITclub

العودة إلى Linux
محاضرة 3

Command Line Interface (CLI) Basics

أساسيات التعامل مع سطر الأوامر (CLI)، والتعرف على أوامر التنقل وإنشاء الملفات والمجلدات.

ملخص المحاضرة

🐧 Lecture 3: Command Line Interface (CLI) Basics

This lecture introduces the Command Line Interface (CLI), explaining what it is, why it's necessary, and how to use its most fundamental commands for navigation and file management.

GUI vs. CLI

  • User Interface (UI): The point of human-computer interaction and communication.
  • GUI (Graphical User Interface): A digital interface where the user interacts with graphical components like icons, buttons, and menus.
  • CLI (Command Line Interface): A text-based user interface used to run programs, manage files, and interact with the computer by typing commands.
  • Shell: The program that takes the text commands you type and gives them to the Operating System to perform.
  • Terminal: The tool or program that opens a black window and lets you interact with the shell.

Why Use the CLI?

While a GUI is user-friendly, the CLI is essential because:

  1. Some advanced tasks cannot be done using the GUI.
  2. It allows you to see more details about background programs and files.

Essential Navigation & Management Commands

This lecture covers the most basic commands for interacting with the system:

  • whoami: Tells you the name of the user you are currently logged in as.
  • pwd: (Print Working Directory) Shows you the full path of the directory you are currently in.
  • ls: (List) Lists all the files and folders in your current directory.
  • cd: (Change Directory) Used to navigate between directories and folders.
    • cd Downloads: Enters the 'Downloads' folder.
    • cd ..: Goes back up one level to the parent directory.
    • cd /: Goes directly to the root directory of the entire system.
  • clear: Clears all previous commands and output from the terminal screen.
  • cp: (Copy) Copies files.
    • cp test testcopy: Copies the file 'test' and creates a new file 'testcopy' with the same content.
  • rm: (Remove) Deletes files.
    • rm testcopy: Deletes the file 'testcopy'.
  • mkdir: (Make Directory) Creates a new, empty folder.
  • rmdir: (Remove Directory) Deletes an empty folder.
  • man: (Manual) Describes what a command does and how to use it.
    • man ls: Shows the manual for the ls command.