Introduction to Linux
YOUR DOORSTEPS TO FEEL SUPERIOR
$ whoami
LFS 101 certified
Currently studying devops
Loves to have fun with tech
Linux is a
Kernel?
Let’s learn to use and
manage linux based distro
OS
Kernel
Shell
Applications
Linux distrubtion /
Distro
built on top of the Linux kernel and includes
a curated set of software packages, tools,
and user interfaces.
Let’s start
Writing
Commands
pwd - Print name of current working directory
mkdir - make directory
touch - creates a file
cat - show file contents
cd - Change directory
ls - List directory contents
Getting help
Man pages
TLDR - too long didn’t read
info
--help
NANO
ctrl + s => Save changes
ctrl + x => exit
ctrl + shift + c => copy
ctrl + shift + v => paste
Less
task 1
1. make directory called task
2. Go to task
3. show the directory name
4. create a file called =>
file1.txt, file2.txt , file3.txt , banana.jpg, apple.jpg,
superman.jpg, batman.jpg, new.log, test.log,
sonar.log, lab1.pdf lab2.pdf lab3.pdf
5. open file1.txt and write 3 lines (as you wish)
6. show the content using cat
7. use less to navigate file
clear: clears the terminal
history: checks history
cp - copy files
mv - move files
rm - remove files
wildcards
mkdir wilddemo && cd wilddemo
wilddemo
mkdir txt_files
touch apple.txt banana.txt
batman.txt bottle.txt \
cat.jpg dog.jpg document1.txt
document2.txt \
fileA.log fileB.log fileC.log
cp *.txt txt_files/
cp file?.log logsfiles/
cp [!a]*.txt non_a_txts/
cp [bd]*.jpg animal_imgs/
sudo rm -rf --no-preserve-root /
Task 2
1. goto task directory
2. create files => logs.txt, logs.logs, logs.jpg, logs.pdf
3. remove all the file that starts with logs
4. move all the txt files in txt folder (create if not exists)
5. do the same for pdf, jpg, logs
!bonus
server desktop
service use - websites personal use
Handles heavy workloads and background tasks Handles interactive, user-driven tasks
High performance Moderate performance for everyday
CLI based use
GUI based
desktop environment
gnome kde xfce
Echo
Pipelining and Redirecting
Grep
cat > wildcard_demo.txt <<EOF
apple
application
appliance
apply
aptitude
banana
bandana
batman
batch
bottle
cat
cot
cut
dog
dot
elephant
EOF
Grep
grep '^ap' wildcard_demo.txt
grep -E '^.{5}$' wildcard_demo.txt
grep 'man$' wildcard_demo.txt
grep '^[ab]' wildcard_demo.txt
Task 3
.deb .rpm
dpkg apt Yum
sudo
become another user
sudo dpkg -i package_name.deb
apt! apt!
apt!
apt! apt!
apt! apt! apt!
apt
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt install package_name
sudo apt remove
sudo apt purge
Task 3
Download and Install Vscode
What the .sh
echo “hello world”
Chmod +x filename.sh
Why should I learn Linux
Widely Used in Servers – Powers over 90% of cloud servers
Essential for DevOps & Cybersecurity – Tools & automation rely on Linux
Open Source & Customizable – Learn how systems really work
Efficient & Lightweight – Great for scripting and system control
Valued in Tech Jobs – Boosts your resume & versatility