Linux Basic Commands
Completion requirements
Linux provides a set of powerful and commonly used commands to interact with the system efficiently. The
Linux provides a set of powerful and commonly used commands to interact with the system efficiently. The cd command is used to change directories, while ls lists the contents of a directory. To clear the terminal screen, the clear command is used. The mkdir command helps create new folders, and pwd shows the current working directory. The rm command is used to remove files or directories, and touch is used to create empty files. To edit or view text files directly in the terminal, vi is a powerful editor. The / symbol represents the root directory, which is the top level of the Linux filesystem. To manage users, adduser is used to create a new user, and userdel is used to delete an existing one. The history command displays a list of previously executed commands, allowing users to track or reuse them easily. These commands form the foundation for working effectively in a Linux environment.
11. clear
clear Command in Linux
The clear command is used to clear the terminal screen.
It doesn’t delete files or commands — it just makes your terminal window look clean.
🔹 Syntax:
clear
🔹 Example:
Before:
$ lsbin sbin root sys etc home$ pwd/home/ashwin$ clear
After:
👉 All the previous output is cleared, and you’re left with a fresh terminal prompt.
🔹 Shortcut Alternative:
Instead of typing clear, you can also press:
Ctrl + L
👉 This also clears the screen (works in most terminals).
🔹 Important Note:
-
It does not delete history. You can still scroll up with the mouse or scroll bar to see old commands/output.
-
It’s purely for visual clarity.
Try With Linux Practice