
Md Saidul Haque
Software Architect
Recent Posts
Categories
Tags
- Agile [1]
- Agile Scrum [1]
- Apex Navigation Menu [1]
- Array [1]
- Associate [1]
- AWS A-Z Overview [1]
- AWS Certification Exam [1]
- AWS Cheat sheet and Glossary [1]
- AWS Top Services and Terms [1]
- Bangla [1]
- CDB [1]
- Cloud computing important terms you should know [1]
- Cloud Practitioner [1]
- connect and basic SQL commands [1]
- create [1]
- CRUD [1]
- Database [11]
- Essential Ubuntu Linux Commands [1]
- Grails [1]
- happiness [1]
- How to start PostGreSQL on Ubuntu 22 - install [1]
- Installation [2]
- Islam [1]
- Javascript [1]
- Language [1]
- laravel [1]
- learning [1]
- Linux [2]
- List of Confusing AWS Cloud terminologies and Comparisons [1]
- Machine Learning [1]
- ML [1]
- Multitenant [1]
- MySQL [5]
- Naming Conventions [1]
- null [2]
- Operating System [1]
- Oracle [6]
- Oracle 19c [1]
- Oracle Apex [8]
- Oracle Database [7]
- PDB [2]
- PHP [1]
- Problem [1]
- Professional Exam [1]
- Programming [1]
- Project Management [1]
- python [1]
- RDMS [1]
- RESTful API [1]
- saidulhaque [1]
- soft skill [1]
- sonmandi [1]
- SQL [1]
- Switching Between PHP Versions: How to Change from PHP 7.4 to PHP 8.3 (and Vice Versa) [1]
- Tawhid [1]
- teaching [1]
- Vue 3 [1]
- Web Site Speed [1]
- what is it [1]
- অন্যান্য পেশার ডোমেইন সংক্রান্ত আমার অভিজ্ঞতার একটা বিশ্লেষণ - সাইদুল হক [1]
- অবস্থার আপেক্ষিকতা - আমি কি বেশি আত্নবিশ্বাসী না প্রাসঙ্গিক? [1]
- আপেক্ষিকতা [3]
- জাভাস্ক্রিপ্ট [1]
- থ্রি জিরোস এবং থ্রি জিরোস ক্লাব [1]
- পৃথিবীতে দেখার মত কি আছে? [1]
- রামাদান [1]
- সফটওয়্যার ইঞ্জিনিয়ার [1]
- সফলতার রহস্য [1]
- সারা দুনিয়ায় চ্যাটজিপিটির কম্পন ও সফটওয়্যার ইঞ্জিনিয়ার চ্যাটজিপিটি থেকে কি কি সুবিধা পেতে পারে? [1]
- স্যোশাল বিজনেস [1]
- স্যোসাল বিসিনেস ডে এবং প্রফেসর মোহাম্মদ ইউনুস। [1]
Essential Ubuntu Linux Commands: Your Go-To Guide

Navigating the Linux environment, especially in distributions like Ubuntu, requires familiarity with fundamental commands to efficiently manage files, directories, and processes. Mastering these basic Linux commands is essential for anyone seeking to navigate and utilize the Ubuntu operating system effectively. Whether you're a novice user or an experienced professional, having a solid grasp of these commands will empower you to navigate the Linux ecosystem with confidence and productivity.
In this guide, we'll explore essential Linux commands that are indispensable for everyday tasks in Ubuntu, helping you become proficient in harnessing the power of this versatile operating system.
Purpose | Commands | Example/Explanation |
Help and Options | ||
show service options | man service_name | man sudo |
Help command or service | service_name --help | man --help |
recuresive | -r | rm -r example.txt |
force to do something. Ignore any prompt when deleting a write-protected file. | -f | rm -f example.txt |
Clear screen | clear | |
show command history | history history | grep ufw history | sort -rn | |
System, Process and Services | ||
shutdown the system | shutdown -r now | |
reboot /restart | reboot init 6 | |
show process for users or all | ps -option | ps -u, ps -aux |
To find the IP address | ip a | |
see Linux servers resource usage | top | top |
Kill process | kill pid | kill 16750, kill -9 16750 (by force) |
Show machine date and time | date | date |
Set time zone | sudo timedatectl set-timezone zone_name | sudo timedatectl set-timezone Asia/Dhaka |
access remote server using SSH | ssh -p 22 user@IP_ADDRESS | ssh -p 22 user@10.10.18.215 |
version check | hostnamectl | |
show all services | service --status-all | |
service status/start/stop | systemctl status/start/stop service_name | systemctl status ssh |
show disk space / disk file system | df -HT | df -HT |
show FIle and Folder wise space | du -sh *|less | du -sh *|less |
exporting environment variables in runtime | export variable_name=value | export MY_PROJECT_PATH=/opt/project/techecosys |
Show all environment variable | env | show all existing variables |
show individual variable | echo $VARIABLE_NAME | echo $MY_PROJECT_PATH |
set another name for a command | alias lsl="command" | alias lsl="ls -l", alias dpa="docker ps -a" |
Search location of any command | whereis command_name | whereis sudo, whereis ls |
See what a command actually is | whatis command_name | whatis sudo, whatis ls |
Unzip zip file | unzip filename.zip -d /path/ | unzip website.zip -d /var/www/html/ |
File and Directory - Wildcard | ||
show present directory | pwd | |
create directory | mkdir folder_name | mkdir dir1 dir2 |
change directory | cd dirtory_path | cd dir1 |
create file | touch options file_name | touch -m example1.txt example2.txt index.html |
Create A File With content | cat filename | cat foo.txt -> Type content -> press ctrl + d |
To view a file content | cat filename | cat foo.txt |
To Append/update Text File content | cat >>filename | cat >>foo.txt |
show all files and folders | ls -l | ls -l |
show all .txt files using Wildcard | ls -l *.txt | * is wildcard which match pattern |
view BIG file content more/less | cat file_name | more or less | cat /etc/passwd | more |
copy file/Files in Linux | cp source destination | cp dir1/foo.txt dir2 |
move file one directory to another | mv source destination | mv dir1/foo.txt dir2 |
remove file | rm options file_name | rm -rf test.txt |
remove all files which are .txt | rm *.txt | |
Copy or duplicate dir | cp [options] source destination | cp [options] source destination |
remove folder | rm -option folder_name | rm -d folder_name - empty rm -r folder_name - nonempty |
big file content view | head file_name or tail file_name | head foo.txt |
To search for matching patterns in a file | grep [OPTION...] PATTERNS [FILE...] | grep -i "UNix" example.txt |
Find file/folder name | find [path] [options] [expression] | find /test/ -type f -name "*.txt" find /path/to/search -type d -name "docs" |
Users, Grups and Permission | ||
Show all users | awk -F':' '{ print $1}' /etc/passwd | Awk prints every line of data from the specified file |
add user with home directory | sudo useradd -m username | sudo useradd -m saidul |
set/modify password | passwd username | passwd saidul |
Switch User | su - username | su - username |
show user group | groups username | |
Add user to a group | sudo usermod -aG groupname username | usermod -aG sudo gkerp |
change file permissions | sudo chmod options file_name | chmod +x foo.txt |
granting ownership of files or folders | chown | chmod saidul:saidul foo.txt |
vim/vi commands | ||
view file content | vi filename | |
insert | press i | |
:q - quit, :wq - write and quit | ||
Network | ||
Display network interfaces and IP addresses | ifconfig | this command shows all network info |
Trace all the network hops to reach the destination | traceroute HOST | traceroute localhost |
Direct download files from the internet | wget | |
Firewall command | ufw allow/status/disallow | ufw allow 80 |
Base firewall for all other firewall utilities to interface with | iptables | |
Package | ||
Update the local package index | sudo apt update | |
Install a new package. | sudo apt install [package] | sudo apt install traceroute |
Uninstall a package. | sudo apt remove [package] | sudo apt remove traceroute |
Upgrade all packages | sudo apt upgrade | |
Remove all packages that were installed automatically as dependencies and are no longer required. | sudo apt autoremove | |
sudo apt autoclean | ||
Purge is identical to remove except that packages are removed and purged (any configuration files are deleted too). | sudo apt-get remove <package-name> | |