Linux Basic Commands1

Manali
3 min readJun 10, 2021

what is Linux?

Linux is one of the most popular and free open source Unix based Operating system, in which you can make changes or contribute. There are several distributions of Linux OS, most popular Linux OS are Debian, Fedora, Ubuntu and Ret-Hat etc..

Linux-based OS involves the kernel → which manages hardware resources and a set of software packages. The command line is your direct access, it’s where you can ask software to perform hardware actions, which GUI cannot perform.

Terminal

Terminal is a very powerful tool that is designed to allow you to send commands to your computer. It can be a simple command of making a directory or navigating from one directory to another to a very complex command of writing a program.

Basic Commands

1 → echo:- It prints out whatever you give it as an input.

2 → pwd:- It shows the current directory we are in.

pwd command in terminal

3 → cd:- This command helps to navigate from one directory to another. For going back to previous directory the command will be → “cd ..”

cd command

4 → ls:- It shows all the directories and files that are in the current directory you are in.

ls command

5 →touch:- It is used to create a file. The file that gets created is empty.

touch command

8 → cal:- It shows calendar on the terminal of current year and current month with today’s date highlighted. “cal -y” → will show you calendar for whole year. You can also get calendar of specified month and year by → “cal [month] [year]”.

cal command
cal year command

9 → date:- It shows today’s date and time with time zone.

date command

10 → clear:- It will clear whatever is on terminal. When we have given a lot’s of command we can clear the terminal with clear command. we can also use “ctrl + l” for this purpose.

clear command

11 → history:- you can see all your commands history with this command. You can run any command in history by running command → “!command-number”, and you can get most recent command by → “!!”. You can clear the history and make the changes permanent by “history -c; history -w”.

history command
!command-number

12 → exit:- you can exit the terminal by exit command or by pressing “ctrl + t”.

--

--

Manali

I am an Engineering Student, I'm exploring different technologies