Linux Basics Course
Welcome to the Linux Basics course! This course is designed for beginners who want to learn the fundamentals of Linux, the terminal, and command-line tools. By the end of this course, you'll be comfortable navigating Linux, managing files, and using basic shell commands.


1. Introduction to Linux
Linux is an open-source operating system widely used for servers, development, and embedded systems. Key features:
- Open-source and free
- Stable and secure
- Multi-user and multitasking
- Supports a variety of file systems
Objectives
- Understand Linux architecture
- Learn basic shell commands
- Manage files and directories
- Use text editors and scripts
2. Getting Started with the Terminal
The terminal is the main interface for interacting with Linux.
- Open a terminal (Ctrl + Alt + T on most distributions)
- The shell prompt looks like this:
username@hostname:~$
- Commands follow the structure: command [options] [arguments]
Example:
ls -l /home
3. File and Directory Management
Commands:
pwd— Show current directoryls— List filescd— Change directorymkdir— Create a directoryrm— Remove files or directoriescp— Copy files or directoriesmv— Move or rename files
Exercise:
- Create a directory called linux_course
- Inside it, create a file notes.txt
- Move the file to a subdirectory week1
4. Viewing and Editing Files
cat filename— Display file contentless filename— Scroll through contentnano filename— Edit files using Nano editorvim filename— Edit files using Vim editor
Exercise:
- Open
notes.txtwith Nano - Add your name and today's date
- Save and exit
5. Searching and Finding Files
find /path -name "filename"— Search for filesgrep "pattern" file— Search inside fileslocate filename— Quickly find files (requires updatedb)
Exercise:
- Create a file
log.txtwith some text - Use
grepto find the word "Linux"
6. Process Management
ps— List running processestop— Interactive process viewerkill PID— Terminate a process by IDhtop— Enhanced process viewer (optional install)
Exercise:
- Run a background process: sleep 100 &
- Find its PID using ps
- Kill the process
7. Permissions and Users
ls -l— View file permissionschmod— Change file permissionschown— Change file owneradduserusername — Add a new usersu username— Switch user
Exercise:
- Create a file secret.txt
- Change permissions so only you can read/write it
8. Package Management (Debian/Ubuntu)
sudo apt update— Update package listssudo apt upgrade— Upgrade installed packagessudo apt install package_name— Install a packagesudo apt remove package_name— Remove a package
Exercise:
- Install htop
- Launch htop and observe processes
9. Learning Linux with GameShell
GameShell is a fun, interactive way to practice Linux shell commands:
- It turns Bash into a text adventure game
- Missions involve navigating directories, managing files, and using commands -Available in multiple languages
Getting Started:
sudo apt install gettext man-db procps psmisc nano tree ncal x11-apps wget
wget https://github.com/phyver/GameShell/releases/download/latest/gameshell.sh
bash gameshell.sh
10. Next Steps
- Learn Bash scripting: loops, conditionals, functions
- Explore cron jobs and automation
- Study networking commands: ping, netstat, ssh, scp
- Try Linux on a virtual machine or Raspberry Pi for practice
Resources
Summary
- By completing this course, you should be able to:
- Navigate and manipulate the Linux filesystem
- Use essential Linux commands
- Manage users, permissions, and processes
- Explore Linux interactively with GameShell