When I come to realize that Windows is not for me, windows is such a bullshit OS, then I focused on Linux. Why linux? Well, its very simple, it allows you to take full control over your machine or computer. Actually its very fast and lightweight. It will also allow you to make changes whatever you want from your computer or machine which means it is customizable as well as secured than other OS. I know MacOS provides you world class UX as well as security. But who can bear those expenses? And for the Windows, its very risky to use while multiple malware attacks and make your machine very slow. Now most important thing is, Linux is fully open source. Its completely free for everyone. It has many tastes and distros. You can choice any of them according to your tastes. Actually Linux is for those people who want full control over their machine, OS as well as everything while MacOS and Windows don't allow you to do that so. They are very limited to provide you such a kind of opportunity. Besides, if you are Mathematics, Computer Science and Logical thoughts enthusiasts, then Linux is for you as I think! Because if you study on CS or Maths, you must have to know to operate Linux! Linux will give you a great power and make you generous since you are become used to in a Open Source softwares and packages. You will feel something to do for general people (its completely my personal opinion btw :")). Windows doesn't run on older archietecture based computer while only Linux can run. Learning Linux allows you to know about Computer Archietecture and how Computer actually works behind. Now, I am going to provide some Linux based bash commands that I learnt up to this day according to their usage in different ways and I made them as categorized-
neofetch/fastfetch - It allows you to view your hardware and other stuffs at a glance, but before you need to install that first!
date - This will show time and date of your current location.
arch - This will let you know about the type of your processor archietecture.
df -h - It allows you to see how much memories your located files have taken, besides it will also show Size, Used, Avail, Use% and Mounted on.
du -sh * - It summarizes each and every folder or directory's spaces inside current directories.
du -sh - Shows the total space used by the current directory.
w - Shows who is logged in and what they are doing.
df -aT - Shows file system type (like ext4, tmpfs, etc.).
df -ha - Includes pseudo, duplicate, and inaccessible file systems.
uptime - Shows how long the system has been running, user count, and load average.
who -b - Shows last boot time.
users - Displays currently logged-in users.
ip a - Shows your IP address and network interfaces.
htop - Interactive system monitor (CPU, Memory, Processes).
history - Shows bash command history.
history -c - Clears history in current shell (not permanent).
history -c && > ~/.bash_history && history -w - Permanently clears bash history.
whoami - Shows your current logged-in username.
passwd (your username) - Change your user password.
ls -la - Lists all files and directories including hidden ones.
package --version - Shows installed package version.
man (command) - Opens manual page for the command.
(command) --help - Shows help and usage of the command.
~ - Represents your home directory path.
sensors - Shows the system and cpu temperature of your machine.
sudo inxi --basic - Tells the entire system information at a glance.
inxi --sensors - Tells the temperature and fan speed in RPM.
uname - According to Wikipedia, uname (short for unix name) is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other
details about the current machine and the operating system running on it. According to Oracle, in order to Display General System Information, use the uname command. It displays the
operating system name as well as the system node name, operating system release, operating system version, hardware name, and processor type.
uname -a - Shows the full kernel information that you are currently using. Here -a refers to all.
uname -r - Shows the released latest kernel of your system where -r refers to release which mean the latest version of the kernel.
uname -s - Displays the system type of your OS where -s stands for system type.
showrev -a - It displays system and software release information.
hostnamectl - Shows you the production information of your machine.
tree -d -L 1 - This will let you see the directories from your root directory and -L 1 stands for the depth layer of your directories, you may change the value instead of 1 according to your taste in order to
to know your directories depth.
sudo apt install (package name) – Install packages.
sudo apt update && sudo apt upgrade – Update and upgrade system packages.
package --version – Check installed package version.
man (command) – Open manual for a command.
(command) --help – Show help/usage for a command.
ls – List files/folders.
ls -a – List all files, including hidden.
ls -A – List almost all files (excludes “.” and “..”).
ls (folder name) – List contents of a specific folder.
ls -la – Detailed list including hidden files.
pwd – Show current working directory.
mkdir (New folder) – Create new directory.
rm -r (Directory) – Remove a directory recursively.
cp (file) /path/to/destination – Copy file to another directory.
cp text.txt another_text.txt – Duplicate file.
cp text.txt /path/to/destination/another_text.txt – Copy and rename in new directory.
mv my_file.txt (Directory) – Move file to another directory.
mv old_name.txt new_name.txt – Rename file.
mv file1.txt file2.txt /path/to/destination – Move multiple files.
cat filename.txt – Display contents of a file.
wc -w filename.txt – Count words in file.
wc -w < filename.txt – Count words (without showing filename).
sed -i 's/mistaken/correct/g' filename – Replace text in file (in-place).
sed -i 's/mistaken/correct/g' /path/to/filename – Replace text in file (with full path).
ls -l | wc -l - This command will tell the total properties inside your current directories as human readable format (decimal).
vim – Open text editor.
vim (filename.extension) – Create/edit a file.
vim program.c – Create/edit C program.
vim program.cpp – Create/edit C++ program.
vim text.txt – Create/edit text file.
gcc/clang – C/C++ compilers.
gcc program.c -o program – Compile C program.
./program – Run compiled program.
gcc program.c -o program && ./program – Compile & run.
time ./program – Measure runtime.
gcc program.c -o program && time ./program – Compile, run & measure time.
lynx/w3m – Terminal web browsers (install required).
lynx www.example.com – Visit a website in terminal.
nmap – Network scanner (install required).
nmap -sn 192.168.0.XXX/24 – Scan devices on local network.
mpv file.mp3/mp4 – Play audio/video.
feh image.png – View image.
pdftotext file.pdf file.txt – Convert PDF to text.
mupdf file.pdf – View PDF file.
yt-dlp "link" – Download video.
yt-dlp -x --audio-format mp3 "link" – Download audio only.
yt-dlp -F "link" – List available formats.
yt-dlp -o "video.mp4" "link" – Set filename.
yt-dlp -o "~/Videos/%(title)s.%(ext)s" "link" – Save to custom path.
yt-dlp -i "playlist-link" – Download playlist.
yt-dlp --write-subs --sub-lang en "link" – Download subtitles.
yt-dlp -c "link" – Resume download.
yt-dlp "link" --list-formats – Show format options.
yt-dlp -f (code) "%(title)s.%(ext)s" "link" – Download specific format.
yt-dlp -f "bv*[height=1080]+ba" -o "%(title)s.%(ext)s" "link" – Download 1080p video + best audio.
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best" "link" – Auto-pick best formats.
yt-dlp -f "bestvideo+bestaudio" "link" – Best quality merged.
yt-dlp -c --no-part --no-clean-infojson -o "%(title)s.%(ext)s" "link" – Resume broken download.
yt-dlp -f bestvideo+bestaudio -o "~/Videos/%(title)s.%(ext)s" "link" – Save in specific folder.
grep -Ri 'text' filename – Search word in file (recursive, case-insensitive).
grep -Ri 'sudo' /home/alex/Documents – Example: search “sudo” in Documents.
cd – Go to default directory.
cd Documents – Enter Documents folder.
cd - – Go to previous directory.
cd .. – Move up one directory.
cd ../Directory – Move to sibling directory.
cd /path/to/destination – Move to absolute path.
cd ~/ – Go to home directory.
cmatrix – Matrix-style animation.
sl – ASCII train animation.
source filename.sh – Run bash file in current shell (for shortcuts/aliases).