Linux Fundamentals Tutorial for Beginners: Commands, File System, Permissions, Users, Environment Variables
A complete Linux Fundamentals tutorial covering Linux distributions, basic commands, file system structure, text editors, permissions, user management, and environment variables. Ideal for beginners and Linux administration learners.
1) Linux Distributions
Linux has many distributions (distros). The kernel is the same, but packaging, tools, and default behavior differ.
Popular Distros:
- RHEL / CentOS / Rocky / AlmaLinux – Enterprise servers
- Ubuntu / Debian – General use, cloud, development
- SUSE / OpenSUSE – Enterprise servers
- Kali Linux – Security testing
Package managers:
- RHEL-based: yum, dnf
- Debian-based: apt
Example: Checking the Linux distribution
Sample output:
Example: Checking kernel version
2) Basic Linux Commands
Navigation
File & Directory Operations
View Content
Search text inside files
Find files
3) File and Directory Structure
Linux file system starts with root /.
Important directories:
/bin– Basic commands (ls, cp, mv)/sbin– System commands (mount, reboot)/etc– Config files (ssh, cron, network)/var– Logs, mail, spool/home– User directories/root– Root user home/tmp– Temporary files/usr– System libraries, applications
Example: Listing top-level directories
Example: Checking config file
4) vim / nano Editors
Opening a file in vim
Modes:
- Insert mode → press
i - Command mode → press
Esc - Save & exit →
:wq - Quit without saving →
:q!
Examples inside vim
- Delete a line:
dd - Copy a line:
yy - Paste:
p - Search text:
/word
nano editor
Keys:
- Save →
Ctrl + O - Exit →
Ctrl + X
5) Permissions and Ownership (chmod, chown)
Linux permissions have 3 parts:
User | Group | Others
r (4) w (2) x (1)
Check permissions
Example output:
Meaning:
- User: rwx
- Group: r-x
- Others: r--
Changing permissions
Numeric method
Meaning:
- User: 7 = rwx
- Group: 5 = r-x
- Others: 5 = r-x
Symbolic method
Changing owner & group
6) Users and Groups
Create a user
Create a group
Add user to group
Delete a user
Check user info
Important files
Example of /etc/passwd entry:
7) PATH and Environment Variables
Check PATH
Sample output:
Temporary variable
Make variable permanent (for specific user)
Edit:
Add:
Reload:
Add a directory to PATH
Permanent:
Add the above line to ~/.bashrc.