1. What is Linux?
Linux is a free, open-source operating system kernel first created by Linus Torvalds in 1991. It's the foundation for many operating systems, collectively known as Linux distributions or "distros".
- Open-source: The source code is freely available for anyone to view, modify, and distribute.
- Multi-user: Designed to handle multiple users simultaneously.
- Multi-tasking: Can run multiple programs concurrently.
2. Linux Distributions
There are many Linux distributions, each with its own characteristics. Some popular ones include:
- Ubuntu: User-friendly, great for beginners
- Fedora: Cutting-edge features, sponsored by Red Hat
- Debian: Highly stable, basis for many other distributions
- Linux Mint: Based on Ubuntu, with a more traditional desktop
- Arch Linux: Highly customizable, suited for advanced users
3. The Linux File System
Linux uses a hierarchical file system structure, starting at the root directory (/):
- /home: User home directories
- /etc: System configuration files
- /bin and /sbin: Essential system binaries
- /var: Variable data (logs, temporary files)
- /tmp: Temporary files
- /usr: User binaries and read-only data
4. Basic Terminal Commands
The terminal is a powerful tool in Linux. Here are some essential commands:
- ls: List directory contents
- cd: Change directory
- pwd: Print working directory
- mkdir: Make directory
- rm: Remove files or directories
- cp: Copy files or directories
- mv: Move or rename files or directories
# Example usage:
ls -l
cd /home/username
pwd
mkdir new_folder
rm file.txt
cp source.txt destination.txt
mv old_name.txt new_name.txt
5. Package Management
Linux uses package managers to install, update, and remove software. Common package managers include:
- apt (Debian, Ubuntu)
- dnf (Fedora)
- pacman (Arch Linux)
# Example with apt:
sudo apt update
sudo apt install package_name
sudo apt remove package_name
6. User Management
Linux is a multi-user system. Basic user management commands:
- useradd: Create a new user
- passwd: Change user password
- userdel: Delete a user
- su: Switch user
- sudo: Execute a command with superuser privileges
Tip:
Always be cautious when using commands that modify system files or require superuser privileges. Double-check before executing potentially destructive commands.
7. Text Editors
Linux offers various text editors. Some popular ones include:
- nano: Simple and easy to use
- vim: Powerful and efficient, with a steeper learning curve
- gedit: GUI-based editor for desktop environments
Further Learning
This guide covers just the basics. To deepen your Linux knowledge, consider exploring: