Welcome to Day 2 of Linux Training 🚀
In Day 1, we learned Linux fundamentals, installation, and boot process.
Today, we dive into the most important part of Linux administration — Command Line Operations and Network Configuration.
Mastering commands is essential for every:
Linux Administrator
DevOps Engineer
Cloud Engineer
System Engineer
📋 Agenda – Day 2
Introduction to Linux Commands
File Management Commands
Process Management Commands
System Administration Commands
Network Commands
Network Configuration (RedHat, Ubuntu, Azure)
Network Configuration using NMTUI
🖥 Introduction to Linux Command Line
The Linux Command Line Interface (CLI) allows users to interact directly with the operating system.
Why CLI is important?
✔ Faster than GUI
✔ Required for servers
✔ Enables automation
✔ Essential for troubleshooting
✔ Used in cloud & DevOps environments
📂 File Management Commands
📁 Directory Commands
ls # List files and directories
cd # Change directory
pwd # Show current path
mkdir # Create directory
rmdir # Remove directory
📄 File Operations
touch # Create file
cp # Copy file/directory
mv # Move or rename
rm # Remove file
🔍 Viewing & Searching Files
cat # View file
vi # Edit file
head # First 10 lines
tail # Last 10 lines
more # Page view
less # Scroll view
find # Search files
grep # Search text
📦 Compression Commands
tar
zip
unzip
bzip2
bunzip2
🔗 Links & Redirection
ln # Create links
> # Overwrite output
>> # Append output
⚙ System Administration Commands
sudo
su
date
uptime
reboot
shutdown
uname
hostname
history
last
dmesg
dmidecode
systemctl
Example:
systemctl status sshd
systemctl start httpd
systemctl enable httpd
🔄 Process Management Commands
ps
top
kill
lsof
fuser -cu
Example:
kill -9 <PID>
🌐 Network Commands
ping
ip addr
netstat
ss
ssh
scp
rsync
tracepath
hostname -I
🌍 Network Configuration in RedHat / Rocky Linux (Manual Method)
Edit configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Example configuration:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
Restart network:
systemctl restart network
🌍 Network Configuration in Ubuntu (Netplan)
Edit file:
vi /etc/netplan/50-cloud-init.yaml
Example:
network:
ethernets:
ens160:
addresses:
- 192.168.2.223/24
gateway4: 192.168.2.1
nameservers:
addresses:
- 192.168.2.1
version: 2
Apply configuration:
netplan apply
🌐 Network Configuration Using NMTUI (Interactive Method)
Apart from manual configuration, Linux provides an interactive tool called nmtui (Network Manager Text User Interface).
This method is easier and reduces configuration mistakes.
🚀 Open NMTUI
nmtui
You will see options:
Edit a connection
Activate a connection
Set system hostname
📝 Configure Static IP Using NMTUI
Step 1: Edit Connection
Select Edit a connection
Choose your interface (example: ens160)
Click Edit
Step 2: Change IPv4 Configuration
Change from Automatic (DHCP) → Manual
Add:
IP Address
Gateway
DNS Server
Enable:
✔ Automatically connect
✔ Available to all users
Save the configuration.
Step 3: Activate Connection
Go to Activate a connection
Deactivate and Reactivate the interface
🔄 Restart NetworkManager (If Needed)
systemctl restart NetworkManager
🔍 Verify IP Address
ip addr
or
nmcli device show
☁ Network Configuration in Azure Cloud
Steps:
Login to Azure Portal
Open Virtual Machine
Go to Networking
Select Network Interface
Change IP Assignment → Static
Save changes
📌 Day 2 Conclusion
Today we covered:
✔ Linux Command Basics
✔ File Management
✔ Process Management
✔ System Administration Commands
✔ Network Commands
✔ Static IP Configuration (Manual + Netplan)
✔ Network Configuration using NMTUI
✔ Azure Network Setup