show users in the machine with encrypted passwords and groups they belong
cat /etc/passwd
show user groups in the machine
cat /etc/group
show the group the current user belong to
group
show active users logged in the machine
w
Ask before removing file
rm -i <file>
History command with number of entries
To show 100 entries of history:
history 100
Return code for last command
# You can only use it once, because after running# echo itself will return 0echo $?
Check the command origin
## print all matching pathswhere <command> # can be used in windows as wellwhich -a <command>## exact matchwhich <command># ------- Modern ways ---------## print single matchtype <command>## print single match and prints exact pathcommand -v <command>