Course: Linux Administration Bootcamp

Basic Linux Commands/Shell Scripting

This tutorial discusses the Linux basic commands with descriptions and how to execute these commands on the Ubuntu terminal.

Linux has multiple commands some of which are stated in the below-given table:

Commands Description
pwd Display the current working directory
date Gives the current date
man Give a guide for a particular command
who Shows the user who is logged in to the system
whoami Display the current username
history Display all the commands executed in the terminal
clear Used to clear the terminal
exit Used to exit the current terminal

To create a shell script, follow the below-listed instructions:

  • Specify the name of any editor, such as nano, gedit, or vim editor with script name like “vi sh”.
  • Add “#!/bin/bash” at the start of the editor which will instruct the operating system to utilize bash as a command interpreter and save them in the newly created script.
  • Add commands in the script and save it.
  • Execute the script through the following syntax:

That’s it! We have illustrated the Linux basic commands with descriptions and their uses. Check out the provided video to perform numerous operations by utilizing the multiple commands for better understanding.

About the author

Talha Saif Malik

Talha is a contributor at Linux Hint with a vision to bring value and do useful things for the world. He loves to read, write and speak about Linux, Data, Computers and Technology.