List
Package
Install Command Update Command Remove Command Installed
Manager
Packages
npm install npm update npm uninstall
npm <package_name> <package_name> <package_name>
npm list
pip install --
pip install pip uninstall
pip <package_name>
upgrade
<package_name>
pip list
<package_name>
sudo apt update
sudo apt install sudo apt remove apt list --
apt <package_name>
&& sudo apt
<package_name> installed
upgrade
sudo yum install sudo yum remove yum list
yum <package_name>
sudo yum update
<package_name> installed
sudo dnf install sudo dnf remove dnf list
dnf <package_name>
sudo dnf update
<package_name> installed
brew install brew upgrade brew uninstall
Homebrew <package_name> <package_name> <package_name>
brew l
Understanding File Systems in Linux and Windows
What is a File System?
A file system is a method used by operating systems to store, organize, and retrieve data on
storage devices such as hard drives, SSDs, USB drives, and SD cards. It defines how data is
stored and managed on a disk, ensuring efficient access and data integrity.
Types of File Systems
File Formatting
Features Usage
System Command
Compatible across multiple OS,
USB drives, memory mkfs.vfat
FAT32 supports files up to 4GB, no /dev/sdb1
cards, bootable drives
journaling
Supports files larger than 4GB, no
USB flash drives, SDXC mkfs.exfat
exFAT journaling, optimized for flash /dev/sdb1
cards, external HDDs
storage
Large file support, journaling, file Windows system drives, mkfs.ntfs
NTFS /dev/sdb1
encryption, compression external drives
No journaling, efficient for flash Older Linux distributions, mkfs.ext2
ext2 /dev/sdb1
storage embedded systems
Journaling, backward-compatible Linux storage, minimal mkfs.ext3
ext3 /dev/sdb1
with ext2 downtime environments
Journaling, supports large files
Default in Ubuntu, mkfs.ext4
ext4 (up to 16TB), reduced /dev/sdb1
Debian, RHEL
fragmentation
XFS High-performance, scalable, Enterprise storage, high- mkfs.xfs
, journaling performance computing /dev/sdb1
Snapshots, RAID support, self- Cloud computing, high- mkfs.btrfs
Btrfs /dev/sdb1
healing availability systems
Massive storage support, Enterprise storage, high- zpool create
ZFS
compression, RAID-Z performance environments mypool /dev/sdb1
Summary: Different file systems offer various features optimized for specific use cases.
Choosing the right file system depends on factors like compatibility, performance, and
security needs.
Understanding MBR and GPT
Partitioning Scheme Features
MBR (Master Boot Traditional system, supports up to 4 partitions, maximum 2TB disk
Record) size, uses boot sector.
GPT (GUID Partition Modern system, supports up to 128 partitions, handles disks larger
Table) than 2TB, includes redundancy for integrity.
Summary: MBR is used in older systems, whereas GPT provides better flexibility and
reliability, working with UEFI firmware.
Creating Partitions in Linux
Tool Steps
fdisk (for lsblk → sudo fdisk /dev/sdb → Create partition (n for new, p for primary)
MBR) → Specify size → Write (w) → Format (mkfs.ext4 /dev/sdb1).
parted (for sudo parted /dev/sdb → Create table (mklabel gpt) → Create partition
GPT) (mkpart primary ext4 1MiB 100%) → Format (mkfs.ext4 /dev/sdb1).
Summary: fdisk is used for MBR partitioning, while parted is used for GPT partitions in
Linux.
Mounting and Unmounting Partitions
Action Command
Temporary sudo mkdir /mnt/mydisk → sudo mount /dev/sdb1 /mnt/mydisk →
Mounting df -h (verify) → sudo umount /mnt/mydisk.
blkid /dev/sdb1 (find UUID) → sudo vi /etc/fstab → Add
Permanent
UUID=xxxx /mnt/mydisk ext4 defaults 0 2 → sudo mount -a
Mounting
(test).
Summary: Partitions can be temporarily or permanently mounted. /etc/fstab ensures
automatic mounting at boot.