Day -1 Date: 26 July 2024
What is Linux?
Linux is a free and open-source family of operating systems that is resilient and flexible. In 1991,
an individual by the name as Linus Torvalds constructed it. The system’s source code is
accessible to everyone for anyone to look at and change, making it cool that anyone can see how
the system works. People from all across the world are urged to work together and keep
developing Linux due to its openness. Since the beginning, Linux has grown into a dependable
and safe OS that is used in an array of gadgets, including PCs, cell phones, and
huge supercomputers.
History of Linux
The history of Linux began in the early 1990s, rooted in the evolution of UNIX and the drive for
open-source software. UNIX, developed in 1969 by Ken Thompson and Dennis Ritchie, was
influential but proprietary, limiting access to its code. In the 1980s, Andrew S. Tanenbaum’s
MINIX provided a UNIX-like system for educational use, but it had limitations. Meanwhile, in
1983, Richard Stallman launched the GNU Project to create a free UNIX-like operating system,
part of the Free Software Foundation’s efforts to support open-source software. The GNU
Project produced essential tools, but it lacked a working kernel. This marked the birth of Linux,
combining the GNU tools and the Linux kernel to form the GNU/Linux operating system, which
quickly gained popularity for its flexibility, security, and community-driven development.
What is Linux Operating System ?
Developed by Linus Torvalds in 1991, the Linux operating system is a powerful and flexible
open-source software platform. It acts as the basis for a variety of devices, such embedded
systems, cell phones, servers, and personal computers. Linux, that’s well-known for its
reliability, safety, and flexibility, allows users to customize and improve their environment to
suit specific needs. With an extensive and active community supporting it, Linux is an appealing
choice for people as well as companies due to its wealth of resources and constant developments.
Ganga Mahajan Page 1 Linux(Ubuntu)
Roll: 22022C04020
Advantages of Linux
The main advantage of Linux is it is an open-source operating system. This means the
source code is easily available for everyone and you are allowed to contribute, modify
and distribute the code to anyone without any permissions.
In terms of security, Linux is more secure than any other operating system. It does not
mean that Linux is 100 percent secure, it has some malware for it but is less vulnerable
than any other operating system. So, it does not require any anti-virus software.
The software updates in Linux are easy and frequent.
Linux is freely available to use on the internet.
It has large community support.
It provides high stability. It rarely slows down or freezes and there is no need to reboot it
after a short time.
It maintains the privacy of the user.
The performance of the Linux system is much higher than other operating systems. It
allows a large number of people to work at the same time and it handles them efficiently.
It is network friendly.
Linux is compatible with a large number of file formats.
It is fast and easy to install from the web. It can also install it on any hardware even on
your old computer system.
It performs all tasks properly even if it has limited space on the hard disk.
Disadvantages of Linux
It is not very user-friendly. So, it may be confusing for beginners.
It has small peripheral hardware drivers as compared to windows.
Ganga Mahajan Page 2 Linux(Ubuntu)
Roll: 22022C04020
Architecture of Linux
The architecture of Linux is organized in layers, providing modularity and security. Here are the
main points:
Hardware Layer:- This is the base layer, including physical components such as the
CPU, memory, hard drives, network interfaces, and other peripherals. The Linux kernel
interacts directly with the hardware to manage these resources.
Kernel Layer:- The core of the Linux OS, managing hardware resources, process
scheduling, memory management, device drivers, file systems, and networking. The Linux
kernel is monolithic, meaning core components run in a unified kernel space for efficiency.
Shell:- The shell is a command-line interpreter that allows users to interact with the system
by entering commands. It acts as an interface between the user and the kernel, interpreting
user commands to perform tasks. Common shells in Linux include Bash, Zsh, and Fish.
Ganga Mahajan Page 3 Linux(Ubuntu)
Roll: 22022C04020
User Applications and Utilities:- This layer includes all software tools and
applications, both command-line (CLI) and graphical (GUI), that users interact with.
Examples include file managers, editors, network tools, and desktop environments like
GNOME and KDE. These applications rely on system libraries to interact with the kernel
indirectly, ensuring stability and security.
Features of Linux
Open-Source: The source code for Linux is freely available and can be modified by
anyone, leading to a large and active community of developers.
Security: Linux is generally considered more secure than other operating systems, with
a focus on security features like user permissions, firewalls, and automatic updates.
Stability: Linux systems are known for their reliability and uptime, with many servers
and critical infrastructure running on Linux.
Flexibility: Linux can run on a wide range of hardware, from small embedded devices
to powerful servers and supercomputers.
Free to Use: Most Linux distributions can be downloaded and used for free, without
any licensing fees.
Linux Requirements
The hardware requirements for running Linux can vary depending on the specific distribution
and desktop environment, but generally, the following specifications are recommended:
Processor: 1 GHz or faster
RAM: 2 GB or more
Storage: 20 GB or more of available disk space
Graphics: Basic integrated graphics or a dedicated graphics car
Ganga Mahajan Page 4 Linux(Ubuntu)
Roll: 22022C04020
Difference between Linux and Windows
The main differences between Linux and Windows include:
Features Windows 11 Linux
Operating System Proprietary Open-source
Type (Closed-source)
Modern, graphical, user-friendly, Varies by distribution (e.g.,
User Interface (UI) designed for both touch and GNOME, KDE, XFCE); can be
traditional input customized
Limited customization of system Highly customizable (desktop
Customization elements and settings environment, kernel, etc.)
Runs most commercial software Runs open-source software by
Software (e.g., Microsoft Office, Adobe suite, default; compatibility layers (e.g.,
Compatibility most games) Wine) for Windows apps
Excellent hardware support for Varies by distribution; generally
Hardware mainstream devices; drivers are good support for most hardware,
Compatibility often provided by OEMs but may require manual driver
installation for niche hardware
Strong security features like Generally more secure due to open-
Security Windows Defender, TPM 2.0, and source nature, more granular
secure boot; however, more control, fewer malware threats,
targeted by malware regular security patches
Higher system requirements (e.g., More flexible system requirements,
System TPM 2.0, Secure Boot, 4GB RAM, can run on older hardware or low-
Requirements 64GB storage) resource devices
Optimized for modern hardware, Highly efficient, can be optimized
Performance but can be resource-heavy for low resource use (ideal for older
machines
Paid (Windows 11 licenses Free (most distributions), with
Cost required, typically bundled with optional paid support (e.g., Red
new PCs) Hat, Ubuntu Pro)
Uses NTFS by default; supports Supports multiple file systems
File System FAT32, exFAT, etc. (ext4, Btrfs, XFS, etc.)
Ganga Mahajan Page 5 Linux(Ubuntu)
Roll: 22022C04020
Day – 2
1. What is Linux File System?
Linux file system is generally a built-in layer of a Linux Operating System used to handle the
data management of the storage. It helps to arrange the file on the disk storage. It manages
the file name, file size, creation date, and much more information about a file.
2. Linux File System Structure
Linux file system has a hierarchal file structure as it contains a root directory and its
subdirectories. All other directories can be accessed from the root directory. A
partition usually has only one file system, but it may have more than one file system.
3. Types of Linux File System
When we install the Linux operating system, Linux offers many file systems such as Ext, Ext2,
Ext3, Ext4, JFS, ReiserFS, XFS, btrfs, and swap.
Ganga Mahajan Page 6 Linux(Ubuntu)
Roll: 22022C04020
4. Explaination of Linux File System
ext2: No journaling, older and less common.
ext3: Older, with journaling for crash recovery.
ext4: Most widely used, supports large files and fast performance.
Btrfs: Modern, supports snapshots, pooling, and high scalability.
XFS: High-performance, great for large files.
F2FS: Optimized for flash storage like SSDs.
ReiserFS: Efficient for small files, less commonly used.
JFS: IBM's journaling file system, reliable and efficient.
ZFS: Advanced file system with data integrity, used in large-scale systems.
5. Types of Linux Directories
In Linux, directories are organizational units used to store files and other directories. Key
directories include:
/ (root filesystem): It is the top-level filesystem directory.
/boot: It includes the static kernel and bootloader configuration and executable
files needed to start a Linux computer.
/bin: This directory includes user executable files.
/etc: It includes the local system configuration files for the host system.
/lib: It includes shared library files that are needed to start the system.
/home: The home directory storage is available for user files. All users have a
subdirectory inside /home.
/mnt: It is a temporary mount point for basic filesystems that can be used at the
time when the administrator is working or repairing a filesystem.
/opt: It contains optional files like vendor supplied application programs that must
be placed here.
/root: It's the home directory for a root user. Keep in mind that it's not the '/'
(root)file system.
/tmp: It is a temporary directory used by the OS and several programs for storing
temporary files. Also, users may temporarily store files here. Remember that files
may be removed without prior notice at any time in this directory.
/sbin: These are system binary files. They are executables utilized for system
administration.
/usr: They are read-only and shareable files, including executable libraries and
binaries, man files, and several documentation types.
Ganga Mahajan Page 7 Linux(Ubuntu)
Roll: 22022C04020
Day - 3
Linux Administrator
Linux administrators, also known as system administrators or sysadmins, are responsible for the
overall management and maintenance of Linux-based systems. Their key responsibilities
include:
a) User Management:
Creating, modifying, and deleting user accounts
Assigning user permissions and access rights
Implementing password policies and authentication mechanisms
b) System Configuration:
Installing, configuring, and updating system software and applications
Managing system services, daemons, and startup processes
Configuring network settings, firewalls, and other system-level components
c) Security Management:
Implementing security measures to protect the system from threats
Monitoring system logs and activity for potential security breaches
Applying security patches and updates in a timely manner
d) Backup and Disaster Recovery:
Performing regular backups of critical data and system configurations
Developing and testing disaster recovery plans
Restoring systems and data in the event of hardware failures or data loss
e) Performance Optimization:
Monitoring system performance metrics and resource utilization
Identifying and resolving performance bottlenecks
Tuning system parameters and configurations to improve efficiency
Ganga Mahajan Page 8 Linux(Ubuntu)
Roll: 22022C04020
Day – 4
1. Essential linux Application Tools
Linux application tools are various utilities and software packages that help users manage and
operate a Linux system efficiently. They enhance productivity, streamline system management,
provide network capabilities, enable development, and add security features. Here’s an overview
of different types of Linux application tools and their purposes:
1. Package Management Tools
Used to install, update, and manage software packages on Linux.
Examples:
o apt (for Debian-based systems like Ubuntu)
o yum and dnf (for RHEL-based systems like CentOS
2.Text Editors
Essential for editing configuration files, code, and general text.
Examples:
o vim and nano (command-line editors)
o gedit (a graphical editor)
3. File Management Tools
Help navigate, manage, and organize files and directories.
Examples:
o ls (lists files in a directory)
o cp (copies files)
o mv (moves files)
o find (locates files based on name, type, etc.)
4. System Monitoring Tools
Provide information on system resources like CPU usage, memory, disk space, and
running processes.
Examples:
o top and htop (display system resource usage in real time)
o ps (shows current processes)
o df (disk space usage)
Ganga Mahajan Page 9 Linux(Ubuntu)
Roll: 22022C04020
5. Networking Tools
Useful for configuring and troubleshooting network connections.
Examples:
o ping (tests connectivity to other network devices)
o netstat (shows network connections)
o ifconfig (displays network interface configuration)
o curl and wget (download files from the web)
6. Compression and Archiving Tools
Help compress and decompress files to save storage or prepare for transfer.
Examples:
o tar (archives files, often used with gzip)
o gzip and bzip2 (compression tools)
o zip (combines compression and archiving)
7. Development Tools
Include compilers, debuggers, and build tools for software development.
Examples:
o gcc (GNU Compiler Collection for languages like C/C++)
o gdb (GNU Debugger)
o make (build automation tool)
8. Database Management Tools
Used to manage databases directly from the command line.
Examples:
o mysql or mariadb (for managing MySQL databases)
o psql (for managing PostgreSQL databases)
9. Virtualization and Containerization Tools
Enable running virtual machines or containers within Linux.
Examples:
o Docker (containerization tool)
o KVM (Kernel-based Virtual Machine)
o VirtualBox (desktop virtualization)
Ganga Mahajan Page 10 Linux(Ubuntu)
Roll: 22022C04020
10. Security Tools
Enhance system security through firewall configuration, encryption, and network
scanning.
Examples:
o iptables and ufw (firewall management)
o gpg (GNU Privacy Guard for encryption)
o nmap (network scanning and security auditing)
11. File Transfer Tools
Allow file transfer over networks or between systems.
Examples:
o scp (securely copies files over SSH)
o rsync (syncs files and directories)
o ftp and sftp (file transfer protocols)
12. Backup and Recovery Tools
Provide options for creating backups and restoring data.
Examples:
o rsync (also used for backup purposes)
o tar (often used for creating compressed backups)
o Timeshift (system snapshot tool)
13. Task Scheduling Tools
Used for automating tasks and running commands at specific times.
Examples:
o cron (runs recurring tasks)
o at (schedules one-time tasks)
14. Graphical User Interface (GUI) Tools
Make Linux easier to use through graphical interfaces, especially for desktop
environments.
Examples:
o Nautilus (file manager for GNOME)
o Dolphin (file manager for KDE)
o GDM (GNOME Display Manager, a login manager)
Ganga Mahajan Page 11 Linux(Ubuntu)
Roll: 22022C04020
15. Logging and Monitoring Tools
Track and analyze system logs for performance and troubleshooting.
Examples:
o journalctl (views systemd logs)
o dmesg (displays kernel messages, useful for hardware troubleshooting)
o logrotate (manages log files by rotating and compressing)
16. Version Control Systems
Used to track and manage changes in codebases, essential for collaborative development.
Example:
o git (a distributed version control system popular in development)
17. Shells
Provide the user interface for command-line interactions.
Examples:
o bash (default shell for many Linux systems)
o zsh and fish (alternative shells with advanced features)
18. Data Processing and Text Manipulation Tools
Manipulate and process data in text files, useful for scripting and automation.
Examples:
o awk and sed (powerful text-processing tools)
o grep (searches text using patterns)
o cut, sort, uniq (basic tools for text processing)
Ganga Mahajan Page 12 Linux(Ubuntu)
Roll: 22022C04020
Day – 5
1. Steps to Install Ubuntu
This guide will walk you through the process of installing Ubuntu on your computer.
a) Prerequisites
Download the latest Ubuntu ISO file from the official website:
https://ubuntu.com/download/desktop
Create a bootable USB drive or DVD using the downloaded ISO file. You can use tools
like Rufus or Balena Etcher for this.
b) Installation Steps
1. Boot from the Ubuntu Live Media: Insert the bootable USB drive or DVD into
your computer and restart your machine. In the boot menu, select the option to boot from
the Ubuntu live media.
2. Choose "Install Ubuntu": Once the Ubuntu live environment loads, you should see
the option to "Install Ubuntu". Click on this to begin the installation process.
Ganga Mahajan Page 13 Linux(Ubuntu)
Roll: 22022C04020
3. Select Language and Keyboard Layout: On the first screen, select your
preferred language and keyboard layout.
4. Choose Installation Type: On the next screen, you'll be asked to choose the
installation type. If you're installing Ubuntu alongside an existing operating system,
select "Install Ubuntu alongside [existing OS]". If you want to erase the entire disk and
install Ubuntu, select "Erase disk and install Ubuntu".
Ganga Mahajan Page 14 Linux(Ubuntu)
Roll: 22022C04020
5. Partition the Disk: If you chose to install Ubuntu alongside an existing OS, you'll
need to manually partition the disk. Allocate space for the Ubuntu installation and create
the necessary partitions (root, swap, and home, if desired).
6. Configure the Installation: On the next screen, you can choose to download
updates and install third-party software during the installation process. Make your
selections and click "Continue".
Ganga Mahajan Page 15 Linux(Ubuntu)
Roll: 22022C04020
7. Location and Time Zone:- Select your location and time zone.
8. Create User Account: Finally, you'll be asked to create a user account for your
Ubuntu installation. Enter your name, username, and password, then click "Continue" to
complete the installation.
9. Finish the Installation: The installer will now copy the necessary files and complete
the installation process. Once it's done, you can remove the bootable media and restart
your computer to boot into your new Ubuntu system
Day – 6
Practice of Installation
Ganga Mahajan Page 16 Linux(Ubuntu)
Roll: 22022C04020
Day – 7
Hardware Information Commands
Hardware information commands help provide insight into various hardware devices on the
system. Use these commands to check hardware information and see hardware device statuses.
Command Description
lscpu See CPU information.
lsblk See information about block devices.
Show PCI devices (graphics card, network card, etc.)
lspci -tv
in a tree-like diagram.
lsusb -tv Display USB devices in a tree-like diagram.
lshw List hardware configuration information.
cat /proc/cpuinfo Show detailed CPU information.
cat /proc/meminfo View detailed system memory information.
cat /proc/mounts See mounted file systems.
free -h Display free and used memory.
sudo dmidecode Show hardware information from the BIOS.
hdparm -i
Display disk data information.
/dev/[device_name]
Ganga Mahajan Page 17 Linux(Ubuntu)
Roll: 22022C04020
Day – 8
Searching Commands
Linux offers various commands to search for files, directories, and text. Use these commands to
search for files and directories on the system and filter the search using various patterns.
Command Description
find [path] -name Find files and directories that match the specified
[search_pattern] pattern in a specified location.
See files and directories larger than a specified size in a
find [path] -size [+100M]
directory.
grep [search_pattern]
Search for a specific pattern in a file with grep.
[file_name]
grep -r [search_pattern]
Recursively search for a pattern in a directory.
[directory_name]
Locate all files and directories related to a particular
locate [name]
name.
Search the command path in the $PATH environment
which [command]
variable.
Use the whereis command to find the source, binary,
whereis [command]
and manual page for a command.
awk '[search_pattern] {print Print all lines matching a pattern in a file. See also
$0}' [file_name] the gawk command, the GNU version of awk.
Ganga Mahajan Page 18 Linux(Ubuntu)
Roll: 22022C04020
Day – 9
File Commands
File commands help with file and directory management on the system. Create, delete, move,
and modify files and directories from the terminal using the commands in the following table.
Command Description
mkdir [directory_name] Create a new directory.
rm [file_name] Remove a file.
rm -r [directory_name] Remove a directory recursively.
Recursively remove a directory without requiring
rm -rf [directory_name]
confirmation.
Copy the contents of one file to another file using
cp [source_file] [destination_file]
the cp command.
cp -r [source_directory]
Recursively copy a directory to a second directory.
[destination_directory]
mv [source_file]
Move or rename files or directories.
[destination_file]
ln -s [path]/[file_name]
Create a symbolic link to a file.
[link_name]
touch [file_name] Create a new file using touch.
cat [file_name] Show the contents of a file.
Ganga Mahajan Page 19 Linux(Ubuntu)
Roll: 22022C04020
Command Description
cat [source_file] >>
Append file contents to another file.
[destination_file]
head [file_name] Show the first ten lines of a file.
Show the last ten lines of a file with the tail
tail [file_name]
command.
more [file_name] Display contents of a file page by page.
Show the contents of a file with navigation using
less [file_name]
the less command.
nano [file_name] Open or create a file using the nano text editor.
vi [file_name]
Open or create a file using the Vi/Vim text editor.
vim [file_name]
gpg -c [file_name] Encrypt a file.
gpg [file_name].gpg Decrypt an encrypted .gpg file.
Show the number of words, lines, and bytes in a file
wc -w [file_name]
using wc.
List the number of lines/words/characters in each
ls | xargs wc
file in a directory with the xargs command.
Cut a section of a file and print the result to
cut -d [delimiter] [file_name]
standard output.
Ganga Mahajan Page 20 Linux(Ubuntu)
Roll: 22022C04020
Day – 10
Directory Navigation Commands
Directory navigation commands provide shortcuts to navigate to the desired location quickly.
Below are several crucial shortcuts to remember when navigating directories in Linux through
the terminal.
Directory Navigation
Description
Commands
ls List files and directories in the current directory.
List all files and directories in the current directory (shows
ls -a
hidden files).
ls -l List files and directories in long format.
pwd Show the directory you are currently working in.
cd
Change directory to $HOME.
cd ~
cd .. Move up one directory level.
cd - Change to the previous directory.
cd [directory_path] Change location to a specified directory.
dirs Show current directory stack.
Ganga Mahajan Page 21 Linux(Ubuntu)
Roll: 22022C04020
Day 11
File Compression Commands
Archive and compress files to save space on your system and organize your data. There are
various compression formats available on Linux, and the table below shows the most commonly
used file compression commands.
Command Description
tar cf [archive.tar] [file/directory] Archive an existing file or directory.
tar xf [archive.tar] Extract an archived file.
tar czf [archive.tar.gz] Create a .gz compressed tar archive.
gzip [file_name]
Compress or decompress .gz files.
gunzip [file_name.gz]
bzip2 [file_name]
Compress or decompress .bz2 files.
bunzip2 [file_name.bz2]
Ganga Mahajan Page 22 Linux(Ubuntu)
Roll: 22022C04020
Day 12
File Transfer Commands
Depending on the transfer method and protocol, Linux has various file transfer commands. Use
these commands to quickly transfer files between two remote machines or to download files
from web servers.
Command Description
Copy a file to a server directory
scp [source_file]
securely using the Linux scp
[user]@[remote_host]:[destination_path]
command.
Synchronize the contents of a
rsync -a [source_directory]
directory with a backup directory
[user]@[remote_host]:[destination_directory]
using the rsync command.
Download files from FTP or web
wget [link]
servers via the wget command.
Transfer data to or from a server
curl -O [link] with various protocols using
the curl command.
Transfer files between local and
ftp [remote_host] remote systems interactively using
FTP.
Securely transfer between local
sftp [user]@[remote_host]
and remote hosts using SFTP.
Ganga Mahajan Page 23 Linux(Ubuntu)
Roll: 22022C04020
Day 13
User and Group Commands
Linux is a multiuser system, and there are various commands to add, modify, remove, and
manage users and groups. The table below outlines the critical user and group commands.
Command Description
id See details about the active users.
last Show the last system logins.
Display who is currently logged into the system with the who
who
command.
Show which users are logged in and their activity with the w
w
command.
finger [user_name] Show user information.
sudo useradd [user_name] Create a new user account.
Create a new user account through the adduser
sudo adduser [user_name]
command interface.
sudo userdel [user_name] Delete a user account.
sudo usermod -aG [group_name]
Modify user information (add a user to a group).
[user_name]
Ganga Mahajan Page 24 Linux(Ubuntu)
Roll: 22022C04020
Command Description
passwd Change the current user's password or another user's password
sudo passwd [user_name] with the passwd command.
sudo groupadd [group_name] Add a new group.
sudo groupdel [group_name] Delete a group.
sudo groupmod -n [new_name]
Modify a user group (change group name).
[old_name]
Temporarily elevate user privileges to superuser or root using
sudo [command]
the sudo command.
su - [user_name] Switch the user account or become a superuser.
chgrp [group_name]
Change file or directory group.
[file/directory]
Ganga Mahajan Page 25 Linux(Ubuntu)
Roll: 22022C04020
Day 14
Package Installation Commands
Specific package manager commands vary between different Linux distributions. Choose the
commands that match your specific distribution.
Debian and Ubuntu-Based Distributions
Debian and Ubuntu-based distributions use the apt-get, apt, and dpkg commands to manage
packages. Below are crucial commands necessary to install packages on these systems.
Command Description
sudo apt-get install
Install an APT package using the apt-get package utility.
[package_name]
sudo apt install [package_name] Install an APT package using a newer APT package manager.
apt search [keyword] Search for a package in the APT repositories.
apt list List packages installed with APT.
apt show [package_name] Show information about a package.
sudo dpkg -i Install a .deb package with the Debian package manager (dpkg
[package_name.deb] command).
sudo dpkg -l List packages installed with dpkg.
Ganga Mahajan Page 26 Linux(Ubuntu)
Roll: 22022C04020
Day 15
Process Related Commands
Every application and command in Linux creates a process. The table below shows various
process-related commands to help manage Linux processes.
Command Description
ps List active processes.
pstree Show processes in a tree-like diagram.
pmap Display a memory usage map of processes.
top See all running processes.
htop Interactive and colorful process viewer.
kill [process_id] Terminate a Linux process under a given ID.
pkill [process_name] Terminate a process under a specific name.
killall [label] Terminate all processes with a given label.
prgrep [keyword] List processes based on the provided keyword.
pidof [process_name] Show the PID of a process.
bg List and resume stopped jobs in the background.
fg Bring the most recently suspended job to the foreground.
Ganga Mahajan Page 27 Linux(Ubuntu)
Roll: 22022C04020
Command Description
fg [job] Bring a particular job to the foreground.
lsof List files opened by running processes with lsof command.
trap "[commands]" Catch a system error signal in a shell script. Executes provided
[signal] commands when the signal is caught.
Pause the terminal or a Bash script until a running process is
wait
completed.
nohup [command] & Run a Linux process in the background.
Ganga Mahajan Page 28 Linux(Ubuntu)
Roll: 22022C04020
Day 16
System Management and Information Commands
Use the terminal to manage the system directly. The commands show how to view basic system
information, change options, and reboot or restart the system.
Command Description
uname -r Show system information via uname command.
uname -a See kernel release information.
uptime Display system uptime, including the load average.
hostname View system hostname.
hostname -i Show the IP address of the system.
last reboot List system reboot history.
date See current time and date.
timedatectl Query and change the system clock.
cal Show current calendar (month and day).
w List logged-in users.
whoami See which user you are using.
finger [user_name] Show information about a particular user.
Ganga Mahajan Page 29 Linux(Ubuntu)
Roll: 22022C04020
Command Description
ulimit [flags] [limit] View or limit system resource amounts.
shutdown [hh:mm] Schedule a system shutdown.
shutdown now Shut down the system immediately.
modprobe [module_name] Add a new kernel module.
dmesg Show bootup messages.
Ganga Mahajan Page 30 Linux(Ubuntu)
Roll: 22022C04020
Day 17
File Permission Commands
File permission commands control user permissions over files and directories. Use these
commands to change and manage the owner, group, and user permissions on the system.
Command Description
Assign read, write, and execute file permission to everyone
chmod 777 [file_name]
(rwxrwxrwx).
Give read, write, and execute permission to owner, and read
chmod 755 [file_name]
and execute permission to group and others (rwxr-xr-x).
Assign full permission to the owner, and read and write
chmod 766 [file_name]
permission to the group and others (rwxrw-rw-).
chown [user_name] [file_name] Change the ownership of a file with chown command.
chown [user_name]:[group_name]
Change the owner and group ownership of a file.
[file_name]
Note: To recursively change file permissions inside multiple directories, see our chmod
recursive guide.
Ganga Mahajan Page 31 Linux(Ubuntu)
Roll: 22022C04020
Day 18
Network Commands
The table below shows a brief list of common Linux network commands. For a more
comprehensive list, check out our Linux Network Commands Cheat Sheet.
Description Command
ip addr show List IP addresses and network interfaces.
ip address add [IP_address] Assign an IP address to interface eth0.
ifconfig Display IP addresses of all network interfaces.
ping [remote_host] Ping remote host.
netstat -pnltu See active (listening) ports with the netstat command.
netstat -tuln Show TCP and UDP ports and their programs.
whois [domain_name] Display more information about a domain.
dig [domain_name] Show DNS information about a domain using the dig command.
dig -x [domain_name] Do a reverse DNS lookup on the domain.
dig -x [IP_address] Do a reverse DNS lookup of an IP address.
host [domain_name] Perform an IP lookup for a domain.
hostname -I Show the local IP address.
Ganga Mahajan Page 32 Linux(Ubuntu)
Roll: 22022C04020
Ganga Mahajan Page 33 Linux(Ubuntu)
Roll: 22022C04020