Linux is a powerful open-source operating system widely used for servers, development, and personal computing. In this tutorial, you will learn the basics of Linux, including file system navigation, commands, and user management.
What is Linux?
Linux is an open-source, Unix-like operating system kernel. It powers many operating systems like Ubuntu, Fedora, and Debian.
Key Features:
- Multi-user: Supports multiple users simultaneously.
- Multi-tasking: Runs multiple processes at the same time.
- Security: Highly secure with user permissions and firewall settings.
- Customizable: Open-source nature allows customization.
📂 Linux File System Structure
Linux follows a hierarchical file system structure. Here are some important directories:
Directory | Description |
---|---|
/ | Root directory (base of the file system) |
/home | User home directories |
/etc | System configuration files |
/var | Variable data (logs, temporary files) |
/usr | User-installed applications |
Basic Linux Commands
1. Navigating Files and Directories
pwd # Show current directory
ls # List files in directory
cd /path # Change directory
2. File Operations
touch file.txt # Create a new file
rm file.txt # Remove a file
cp file1.txt file2.txt # Copy file
mv file1.txt /path/ # Move file
3. Managing Processes
ps # List running processes
kill PID # Terminate a process using its ID
top # Show real-time CPU and memory usage
4. User Management
whoami # Show current user
adduser user_name # Create a new user
passwd user_name # Change user password
🛠️ Linux Package Management
Different Linux distributions use different package managers:
- Debian/Ubuntu:
apt
sudo apt update sudo apt install package-name
- RedHat/Fedora:
dnf
sudo dnf install package-name
- Arch Linux:
pacman
sudo pacman -S package-name
Conclusion
Linux is a powerful and flexible OS with extensive command-line control. By learning basic commands, file system structure, and package management, you can efficiently use Linux for various tasks.