21# su
This command stand for switch user. su
command is used to switch user, if you are switching from normal user to the superuser, you may need to type sudo su
.
And from superuser to the normal one, just type su [name of the user]
, example: su sunil
.
22# whoami
This command reveals the user who is currently logged in.
23# ps
This command stands for processes and it displays the currently running processes in the Linux system.
24# date
This command displays current date and time of your system.
25# cal
This command shows the calendar of the current month.
26# free -g
This command shows free and used memory in gigabyte.
Additional tips and tricks for using Linux command line
- You can use the
clear
command to clear the terminal if it gets filled up with too many commands. Ctrl+C
can be used to stop any command in terminal safely. If it doesn’t stop with that, thenCtrl+Z
can be used to force stop it.- You can exit from the terminal by using the
exit
command. - You can power off or reboot the computer by using the command
sudo halt
andsudo reboot
.
Conclusion:
So these are some of the basic Linux commands you would require in Linux environment from time to time. These commands will take time to learn, and years to master but it will come with many benefits and will become second nature after time.