Linux How-To Topics
1. Files and Directories
- How to create a file
- How to rename a file
- How to copy a file
- How to move a file
- How to delete a file
- How to create a directory
- How to delete a directory
- How to copy directories recursively
- How to delete directories recursively
- How to view hidden files
- How to create a hidden file or directory
- How to find files using
findandlocate - How to view file contents using
cat - How to view file contents using
less - How to view file contents using
more - How to compare files using
diff - How to compare files using
cmp - How to check the file type using
file - How to create symbolic links using
ln -s - How to archive files using
tar - How to compress files using
gzip - How to compress files using
bzip2 - How to compress files using
zip - How to extract compressed files (
tar,unzip,gunzip)
2. User Management
- How to add a new user
- How to modify an existing user
- How to delete an existing user
- How to create a user group
- How to add a user to a group
- How to remove a user from a group
- How to delete a user group
- How to switch users using
su - How to execute commands as another user using
sudo - How to change a user’s password using
passwd - How to set password expiry rules using
chage - How to lock and unlock a user account
- How to configure user login shell
- How to configure user environment variables
- How to edit a user's profile and startup files (
.bashrc,.profile)
3. Permissions and Ownership
- How to view file permissions
- How to change file permissions using
chmod - How to use numeric mode with
chmod - How to use symbolic mode with
chmod - How to change file ownership using
chown - How to change group ownership using
chgrp - Understanding permission symbols:
r,w,x - Understanding permission types: user, group, others
- Understanding special permissions: SUID, SGID, Sticky bit
- How to use Access Control Lists (ACLs)
- How to set ACL permissions using
setfacl - How to view ACLs using
getfacl - How to find files with specific permissions
4. Package Management
- How to install packages using
apt - How to remove packages using
apt - How to install packages using
yum - How to install packages using
dnf - How to install packages using
pacman - How to update package lists
- How to upgrade installed packages
- How to perform a full system upgrade
- How to search for packages
- How to list all installed packages
- How to check package details (version, dependencies)
- How to verify if a package is installed
- How to clean up unused packages and cache
- How to add a new software repository
- How to remove or disable a repository
- How to manage PPA (Personal Package Archives) in Ubuntu
- How to compile software from source (configure, make, make install)
- How to remove software installed from source
5. Processes and Services
- How to list processes using
ps - How to monitor real-time processes using
top - How to use an advanced process viewer with
htop - How to check memory usage using
free - How to kill a process using
kill - How to kill a process by name using
pkillorkillall - How to restart a process
- How to adjust process priority using
niceandrenice - How to run jobs in background and foreground (
bg,fg,jobs) - How to manage services using
systemctl - How to manage services using
service(legacy systems) - How to view service logs using
journalctl - How to schedule tasks using
cron - How to schedule one-time tasks using
at
6. Networking
- How to view IP address using
ipandifconfig - How to list and manage network interfaces
- How to configure a static IP address
- How to configure DHCP settings
- How to test internet connectivity using
ping - How to trace route to a host using
traceroute - How to test HTTP connectivity using
curl - How to download files using
wget - How to connect to a remote server using
ssh - How to copy files between systems using
scp - How to manage the firewall using
ufw - How to manage the firewall using
iptables - How to open and close ports in the firewall
- How to check listening ports using
netstatorss - How to view active connections and sockets
7. Disk and Filesystem Management
- How to list disks and partitions using
lsblk - How to view disk details using
blkidanddf -h - How to mount and unmount disks
- How to mount ISO files or loop devices
- How to format drives and partitions
- How to create a filesystem using
mkfs - How to manage disk partitions with
fdiskandparted - How to label a disk or partition using
e2labelortune2fs - How to check disk usage using
dfanddu - How to check and repair filesystems using
fsck - How to find disk UUIDs using
blkid - How to configure automatic mounting with
/etc/fstab - How to check disk health with
smartctl
8. System Information and Logs
- How to check system information using
uname - How to check system hostname using
hostname - How to check hardware details using
lshw - How to check CPU information using
lscpu - How to check block devices using
lsblk - How to read system log files from
/var/log - How to monitor boot logs using
journalctl - How to view shutdown logs
- How to use
dmesgfor kernel ring buffer logs
9. Shell Scripting
- How to write a basic shell script
- How to use variables in shell scripts
- How to use loops in shell scripts
- How to use conditionals in shell scripts
- How to use functions in shell scripts
- How to read user input in shell scripts
- How to handle command line arguments in shell scripts
- How to use exit status and return codes
- How to include comments in shell scripts
- How to make a script executable
- How to schedule scripts using
cron - How to schedule one-time scripts using
at - How to log output of shell scripts
- How to debug shell scripts
10. Security
- How to set up SSH keys
- How to change default SSH port
- How to configure firewall using
ufw - How to allow or block specific ports
- How to disable root login via SSH
- How to enable and configure fail2ban
- How to check active network connections
- How to scan for open ports using
nmap - How to enable and configure SELinux
- How to enable and configure AppArmor
- How to check for user login history (
last,w) - How to set file and directory permissions securely
- How to audit logs for suspicious activity
Comments
Loading comments...