1. mkdir --help
Meaning: Shows help for mkdir command
Description: Displays all options and usage rules for creating directories.
2. clear
Meaning: Cleans the terminal
Description: Removes all previous output from the terminal screen.
3. alias c=clear
Meaning: Creates a shortcut for clear
Description: After this, typing c and pressing Enter will clear the terminal.
4. /etc/shadow
Meaning: Stores user passwords
Description: Every hacker wants to access this file because it contains all encrypted passwords.
5. /etc/passwd
Meaning: Stores user information
Description: Contains username, UID, GID, home directory, and shell.
6. /etc/group
Meaning: Stores group information
Description: Contains group names, GIDs, and group members.
7. tail -3 /etc/shadow
Meaning: Shows last 3 lines of shadow file
Description: Displays password info of the last 3 users.
8. head -3 /etc/shadow
Meaning: Shows first 3 lines of shadow file
Description: Displays password info of the first 3 users.
9. cat /etc/group
Meaning: Shows all groups
Description: Displays all group information and members.
10. cat /etc/passwd
Meaning: Shows all users
Description: Displays all user account information.
11. cat /etc/shadow
Meaning: Shows passwords of all users
Description: Displays encrypted passwords and password policy details.
12. whoami
Meaning: Shows current user
Description: Tells you which user you are currently logged in as.
13. pwd
Meaning: Shows current folder
Description: Tells you which directory you are currently in.
14. useradd --help
Meaning: Shows help for useradd
Description: Displays all options and rules for creating a new user.
15. useradd kamal
Meaning: Creates a new user named kamal
Description: Creates a user account and a group named kamal.
16. passwd kamal
Meaning: Sets password for user kamal
Description: Used to set or change the login password for a user.
17. sudo
Meaning: Run command as superuser
Description: Means "on behalf of the superuser." Not needed if you are already root.
18. usermod -s /sbin/nologin kamal
Meaning: Blocks login for kamal
Description: Changes the user's shell to nologin so they cannot log in.
19. usermod -s /bin/bash kamal
Meaning: Unblocks login for kamal
Description: Restores the bash shell so the user can log in again.
20. history
Meaning: Shows previously used commands
Description: Displays a list of commands you have run earlier.
21. su kamal
Meaning: Switch to user kamal
Description: Logs in or switches to the kamal user account.
22. exit
Meaning: Ends current session
Description: Closes shell, returns to previous user, or closes terminal.
23. usermod -L kamal
Meaning: Locks kamal account
Description: Locks the user account by adding ! to the password.
24. usermod -U kamal
Meaning: Unlocks kamal account
Description: Unlocks the user account by removing ! from the password.
25. usermod -e 2026-08-27 kamal
Meaning: Sets expiry date for kamal
Description: Account will automatically expire on the given date.
Key Concepts
Group Explanation:
A group is like a WhatsApp group. If you send a message, all members see it. In Linux, you give permissions (read, write, or both) to a group, and all members get that access.
User Creation Rules:
- When you create a user, a group with the same name is automatically created.
- User IDs (UID) start from 1000 by default.
Password Status in /etc/shadow:
- Password set → shows encrypted text
- No password → shows
!(account locked)
Shell:
A program that:
- Takes user commands
- Tells computer to execute them
- Shows results
- Acts as an interface between user and operating system
Service Users:
Every service in Linux runs as a user.
Quick Reference Table
| Command | কাজ |
|---|---|
mkdir --help |
mkdir-এর help দেখায় |
clear |
Terminal পরিষ্কার করে |
alias c=clear |
Shortcut তৈরি করে |
/etc/shadow |
Password থাকে |
/etc/passwd |
User info থাকে |
/etc/group |
Group info থাকে |
tail -3 /etc/shadow |
Last 3 lines দেখায় |
head -3 /etc/shadow |
First 3 lines দেখায় |
cat /etc/group |
সব group দেখায় |
cat /etc/passwd |
সব user দেখায় |
cat /etc/shadow |
সব password দেখায় |
whoami |
Current user দেখায় |
pwd |
Current folder দেখায় |
useradd --help |
useradd-এর help দেখায় |
useradd kamal |
নতুন user তৈরি করে |
passwd kamal |
Password set করে |
sudo |
Super user হিসেবে চালায় |
usermod -s /sbin/nologin kamal |
Login বন্ধ করে |
usermod -s /bin/bash kamal |
Login চালু করে |
history |
আগের commands দেখায় |
su kamal |
kamal user-এ switch করে |
exit |
Session বন্ধ করে |
usermod -L kamal |
Account lock করে |
usermod -U kamal |
Account unlock করে |
usermod -e DATE kamal |
Expire date set করে |
Top comments (0)