Linux Server Administration – Complete Notes (CIITM Dhanbad)

Published: (December 2, 2025 at 11:45 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

UNIT – I : Linux Introduction, File System & Basic Commands

1. Introduction to Linux

  • Linux is a free, open-source, secure and stable operating system.
  • Based on UNIX, widely used in:
    • Servers
    • Cloud systems
    • Networking
    • Cybersecurity
    • Development
  • Known for:
    • High security
    • Fast performance
    • Virus resistance
    • Multi‑user environment

2. Basic Features of Linux

  • Multiuser & multitasking
  • Portable & open‑source
  • Strong networking support
  • Highly customizable
  • Powerful shell & scripting

3. Flavors (Distributions) of Linux

Common Linux distros:

  • Ubuntu
  • Debian
  • RedHat (RHEL)
  • Fedora
  • CentOS
  • Kali Linux
  • Linux Mint

4. Advantages of Linux

  • Free & open source
  • Highly stable
  • Virus free
  • Powerful command line
  • Supports programming & servers
  • Community support

5. How Linux Accesses Files

Linux uses an inode‑based file system, where every file has:

  • inode number
  • file type
  • file permissions
  • owner & group
  • size
  • storage location

Linux treats everything as a file, including:

  • devices
  • directories
  • processes
  • sockets

6. Linux Standard Directories

DirectoryPurpose
/Root directory
/homeUser home directories
/rootRoot user home
/binBasic user commands
/sbinSystem admin commands
/etcConfiguration files
/devDevice files
/varLogs & variable data
/usrInstalled software
/tmpTemporary files

7. Basic File & Directory Commands

CommandDescription
pwdShow current directory
cdChange directory
lsList files
cpCopy files
mvMove / rename
rmRemove files
mkdirCreate directory
rmdirDelete directory
fileShow file type
more, lessView long files

8. Creating & Viewing Files using cat

cat > file.txt        # create
cat file.txt          # view

9. File Comparison Commands

  • cmp file1 file2 – compare byte‑by‑byte
  • comm file1 file2 – compare line‑by‑line
  • df -h – show disk free space
  • du -sh folder – folder size
  • mount – mount disk
  • umount – unmount disk

UNIT – II : Shells, Processes, Pipes, Filters, Scheduling & VI Editor

1. Understanding Shells

A shell is a command interpreter. Popular shells:

  • Bash (default)
  • Zsh
  • Ksh
  • Tcsh

2. Processes in Linux

A process = program in execution. Common commands:

ps        # show processes
top       # live monitoring
kill PID  # terminate
jobs      # show background jobs

3. Connecting Processes with Pipes

ls | wc -l

Pipes send output of one command to input of another.

4. Input / Output Redirection

OperatorMeaning
>output to file
>>append output
2>redirect error
&>output + error

5. Help Commands

  • man command
  • help command
  • info command

6. Background Processing

command &
jobs
bg %1
fg %1

7. Managing Multiple Processes

  • ps
  • pgrep
  • htop
  • kill

8. Changing Process Priority

nice -n 10 program
renice 5 PID

9. Scheduling Commands

Using cron

crontab -e

Using at

at 5pm

10. File & Utility Commands

CommandDescription
touchcreate empty file
wccount lines/words/chars
cutextract columns
ddcopy/convert data
exprmath command
bccalculator tool

11. VI / VIM Editor

Modes

  • Command mode
  • Insert mode
  • Last‑line mode

Useful commands

i      " insert
x      " delete char
:w     " save
:q     " quit
:wq    " save & quit
/text  " search text

12. Simple Filter Commands

  • pr
  • head
  • tail
  • cut
  • paste
  • sort
  • uniq
  • tr

13. Regular Expression Filters

  • grep – search patterns
  • egrep – extended grep
  • sed – search & replace

Example:

sed 's/old/new/g' file.txt

UNIT – III : Shell Programming & System Administration Basics

1. Introduction to Shell Programming

A shell script is a text file containing Linux commands.

Example:

#!/bin/bash
echo "Hello Linux"

Run:

chmod +x script.sh
./script.sh

2. Shell Programming Concepts

Variables

name="Abhishek"
echo $name

Conditions

if [ $a -gt 10 ]; then
  echo "OK"
fi

Loops

for i in 1 2 3; do echo $i; done

Functions

hello(){ echo "Hello"; }

3. System Administration Tasks

  • User management
  • Disk management
  • Network setup
  • Package installation
  • Backup & restore
  • System monitoring

4. Configuration & Log Files

Logs are stored in:

/var/log/

Important files:

  • /etc/passwd
  • /etc/shadow
  • /etc/fstab
  • /etc/hosts

5. Linux Installation Process

  • Boot from USB/DVD
  • Create partitions
  • Install base system
  • Install bootloader
  • Reboot

6. System Startup / Shutdown

shutdown -h now
reboot
systemctl reboot

UNIT – IV : User Management, File System, Permissions & Networking

1. Managing User Accounts

Add user

useradd username
passwd username

Delete user

userdel username

2. Permissions & Ownership

Permission types

  • Read (r)
  • Write (w)
  • Execute (x)

Change permissions

chmod 755 file

Change owner / group

chown user file
chgrp group file

3. Managing Groups

groupadd group
groupdel group

4. Disable User Account

usermod -L user

5. Creating & Mounting File System

mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /mnt

6. Super User (su / sudo)

su
sudo command

7. Backup & Restore

  • cp
  • rsync
  • tar
  • scp

8. Installing & Removing Packages

Ubuntu/Debian

apt install package
apt remove package

RHEL/CentOS

yum install package
yum remove package
Back to Blog

Related posts

Read more »