• Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / Linux sysadmin tutorials linux system administrator

Linux sysadmin tutorials linux system administrator

Table of Contents

Toggle
  • Introduction to UNIX & LINUX
  • File & directory management
    • Disk quota management
  • Systemd services
  • list-units
  • Linux process management
  • Firewall setup
    • Remote management of linux server
    • Linux Log management
    • Backup & recovery
  • DD to Recovery Images
  • system updates & package management
  • Linux Volume management(LVM)
    • Create the Partition
    • Introduction to UNIX & LINUX

Introduction to UNIX & LINUX

 Files and Directories Management
 User and Group Administration
 Basic File Permissions
 Disk Partitioning and Mounting File System
 Data Backup and Recovery
 Software Package Administration
 Dynamic Host Configuration Protocol (DHCP)
 FTP Server (vsftpd daemon)
 DNS Server
 Web Server (Apache)
 Network File System (NFS)

File & directory management

nano
Vim
touch
tee
directory level operations
file permissions
644
r read
W write
X execute
change owner chown
Ownership
Owner, group, public
change group
chgrp
User management
users
group
Permission
system accounts
interactive accounts
sudo add user newuser;
m- creates directory for user, if not exist.
M- not creates directory for user
add /change password to user
passwd newuser;
groupadd newgroup;
creates new group.
gpasswd new group:
New password
re enter password
groups; to view all groups
groups group name
To view users in group
chgrp file/directory ownership to other group.
usermod
add & remove users from group
-a adds user to group only -G option
-G adds removes users to secondary groups
-g primary group
-d directory users directory
usermod -a -G group user

Disk quota management

backup fstab
backup grub file
edit files
Save
add quota to user, group
Remount & restart

Systemd services

systemd  used to manage both services and daemons
systemctl –version
systemd 230
Units are the resources systemd knows how to interpret
12types
  • .service
  • .socket
  • .device
  • .mount
  • .automount
  • .swap
  • .target
  • .path
  • .timer
  • .snapshot
  • .slice
  • .scope
/lib/systemd/system (base unit files)
/etc/systemd/system (modified unit files at runtime)
-t service or sockets
-a loaded units
systemctl -t service
systemctl stop apache2
systemctl –all -t service | grep apache2
Start/stop/reload/restart/enable/disable/status
systemctl status network.service
systemctl is the utility used to control systemd
systemctl status
all status
systemctl status firewalld
Ufw iptables

list-units

systemctl list-units –type=socket
systemctl list-units –type=service
systemctl cat firewalld
Cat to read/write append etc.
cgroups or Control Groups
used assign resources for groups and users by admin
cpu,disk, memory,
Install & enable libcgroup
yum install libcgroup
systemctl enable cgconfig
CPU Slices
CPUShares

Linux process management

Process Management–bg, fg, nohup, ps, pstree, top, kill, killall, free, uptime, nice.
PID= process identification number
Pgrep used to know pid of process.
pgrep systemd
1
jobs − List of the current processes attached to the shell
ctrl+z to. sleep the current process.
ps command
ps axw | grep python
ps= process snapshot
grep : to filter the process name
a= Excludes constraints of only the reporting processes for the current user
X=Shows processes not attached to a tty or shell
W= Formats wide output display of the output
-u= shows all processes by specific user
-c all process by name or PID
-e selects all processes
–sort
to see all processs by user
ps -u www-data
all information about the process nginx
ps -wl -C nginx
top 10 memory consuming process
top,htop
Or
ps aux –sort =-pmem | head -10
pstree
tree like model
killall
killall chrome
kills all the process for all users.
pkill: kill the process by name
pgrep apache2
to know process id
pkill -9 apache2
Kill command
Kill pid
Signals graceful kill
SIGTERM

Firewall setup

firewalld in centos
iptables /, ufw in ubuntu debian Linux distributions
block ports,
block services,
block ipmasq
ICMP (Internet Control Message Protocol)
Block ip addresses
firewalld & ufw uses  iptables as a backend.

Remote management of linux server

ssh client (putty), sftp client (winscp).
whm, capnel, zpanel etc.

Linux Log management

components behind systemd logging are: journald(daemon), journalctl(analyzes events logged by journald), and journald.conf(config file)
journalctl −k (kernel messages)
journalctl −u (units like services, sockets,sshd,apache2)
logs by type emergency,warn
0-emergency
1 alert
2 critical
3 error
4 warning
5 info
6 debug
journalctl -p 4
Warning logs.

Backup & recovery

321 rule
3 copies of data.(working data, backup on server weekly, offline in hdd)
rsync remote sync
rsync syntax:rsync [options] [local path] [[remote host:remote path] or [target path
or use sftp client to download compress data.
 Syncing backup in local & remote
local
mkdir /root/etc_baks
rsync -aAvr /etc/ /root/etc_baks/

DD to Recovery Images

 

system updates & package management

system updates & install update packages
linux disruption upgrade
sudo apt-get update && sudo apt-get upgrade
Installing packages or additional softwares
add dependency or repository
To install precompiled softwares for your linux distribution.
or manually downloading & compile & install.
sudo apt-get remove curl
autoclean options are there.
Shell scripting
a bit knowledge of programming required.
Like logical operators, variables, condition statements, & loops .

Linux Volume management(LVM)

physical disk = dev/ sda
partition physical disk  dev / sda1 dev/sda2
Volume group (group of physical volume by physical disks) 2disk each 1tb in a sysyem 2tb is the volume group.
Logical volume
LVM tools such as the System Storage Manager: lsblk, parted, and mkfs.xfs.
lsblk is a great tool for getting disk information
disks on this system: sda, sdb, and sdc.
sda has linux so,
parted /dev/sdb mklabel GPT
all data will ve deleted

Create the Partition

parted -a opt /dev/sdb mkpart primary ext4 0% 100%
any warnings
Update fstab
/etc/fstab
Make files system
(Which linux file system useful for you)
xfs filesystem
mkfs.xfs -f /dev/sdb1
Lets verify
lsblk -o NAME,FSTYPE
Mounting
mount -o defaults /dev/sdb1 /mnt/sdb
mount on boot we need to edit fstab.
Or ssm
apt install system-storage-manager
ssm list
To know the volumes
create -p NEW_POOL /dev/sdb1 /dev/sdc1
One large disk from freespace
or 3seperateeach 3.3gb out of 10gb.
root@localhost rdc]# ssm create -n disk001 –fs xfs -s 3GB -p NEW_POOL

Introduction to UNIX & LINUX

• History of UNIX and LINUX
• Differences between CentOS, Red Hat
Enterprise Linux & Fedora
• FHS and Linux Installation
Files and Directories Management
• Creating files using cat and touch
commands
• Creating directories using mkdir
command
• Modifying file content using vi / vim
editors
User and Group Administration
• Creating and deleting users from the
systems
• Creating and deleting groups
Basic File Permissions
• Verifying file permissions of existing
objects
• Modifying files permissions using chmod
command
Disk Partitioning and Mounting File
System
• Creating partition using fdisk command
• Formatting the partitions
• Mounting the partitions
Data Backup and Recovery
• Taking data backup using tar command
Software Package Administration
• Installing and deleting software packages
using RPM & YUM
• Querying and updating software
packages
Dynamic Host Configuration Protocol
(DHCP)
• Configuring Linux as DHCP Server
• Configuring various clients for DHCP
Server (Windows & Linux)
FTP Server (vsftpd daemon)
• Basics of File Transfer Protocol
• Configuring FTP protocol to download
and upload the files
DNS Server
• Configuration of DNS server
• Configuration of forward lookup zone
• Configuration of reverse lookup zone
• Testing tool of DNS zones
Web Server (Apache)
• Basics of Web Service
• Introduction to Apache
• Configuring Apache to host website
Network File System (NFS)
• Configuring NFS file sharing server
• Mounting NFS shared folder from client
systems

Linux sysadmin tutorials linux system administrator

  • top 10 apt & apt-get commands (most used) apt vs apt-get
  • If-Else Statements in Shell Scripting
  • linux commands pdf (files & Directories, zip & unzip process, search etc)
  • Find Files with Specific Text on Linux grep find command
  • linux performance tuning inode limit file descriptors tco, kernel etc
  • Variables and Data Types in Shell Scripting
  • Top 10 most used Cat commands with examples (create, view, append files)
  • Ip tables / ufw / firewall d commands for block port ip rate limiting
  • Top 10 zip / tar commands to compress & extract files in linux
  • TOP 10 mv & cp commands in linux to move & copy files in Linux
  • Top 10 GREP Commands in linux to search files directory words strings
  • lsof netstat commands to know listening ports in linux 3 ways
  • Upgrade Ubuntu from 18.04 (19.10) to 20.04 LTS command line or gui server | desktop
  • 3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx
  • linux system specs commands (CPU, Memory, Disk )speed, type. manufacture
  • linux sysctl command tweaks & hardening
  • linux security limits.conf deciding user limits process limits for nginx server
  • ulimit linux unlimited command unlimto set & know user limits open files file descriptor max user process etc.
  • red hat linux certification cost jobs salary syllabus courses fees
  • ufw firewall commads allow port enable disable ubuntu 20.04
  • ddos attack prevention
  • change ssh port in linux - avoid sshd ddos attacks
  • ping command
  • memcached install ubuntu wordpress
  • check linux version (lsb_release -a) ubuntu debian 32 or 64 bit
  • rsync command linux with examples comparison to scp
  • how to uninstall package in linux ubuntu rpm, yum apt-get
  • increase open file limit linux File descriptor ft nginx , mysql, lemp
  • remove repository ubuntu
  • htop commad memory details virtual vs shard vs resident
  • chown command in Linux with Examples
  • Kill PHP process
  • VIrtual Memory vs RSS Memory vs Shared memory in Linux
  • oom killer fixing it by configuration linux ubuntu
  • Install Lemp nginx mysql php fpm Stack on Debian 11 with repository
  • connect two remote servers linux command line
  • auto start after oom killer Mysql & php fpm nginx etc ubuntu wth systemd or cron job
  • load average Linux 1, 5, 15 min 2,4,8 cores explained
  • Control Structures in Shell Scripting
  • Shell Scripting Roadmap for Beginners to Advanced
  • awk commands with practical examples
  • Shell Scripting Tutorial for Beginners 🚀
  • find Command in Linux with Examples
  • sed Command in Linux with Examples (Beginner to Advanced)
  • Linux Text processing commands in with Examples
  • linux disk management commands
  • fdisk command in linux with examples
  • how to add a new disk in linux
  • Linux mount Command with Examples
  • fstab options with examples
  • Top 50 Shell Scripting Interview Questions and Answers
  • Linux Networking Interview Questions and Answers
  • Linux Networking Commands Cheat Sheet with Examples pdf
  • Netstat & SS Commands cheat sheet with examples Interview Questions
  • Nmap Cheat Sheet – Network Scanning & Security
  • Bash Brackets ([], (), {}, $( ), $(( ))) – Types, Uses & Examples

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy