Some Essential Linux Commands for Beginners | Part -1

September 05, 2019

In Linux, the most exciting part is its command-line advantage. We can do everything using this interface. I’m here to share my knowledge with you.

Here we are going to learn :

  • Find directory path
  • Show files and directories list
  • Create directory
  • Enter into directory
  • Create File

After opening the terminal, our position is in the root directory. Let’s check the directory’s path.

~$ pwd                                                

[email protected]:~# pwd
/root

We can check those files which are in this root directory.

~$ ls

[email protected]:~# ls
Desktop    Downloads  offlineimap  Public  Templates  Videos
Documents  Music      Pictures     snap    Test       wordpress

Now, we’ll make another directory called Test :

~$ mkdir Test                                        

Again check the list using ~$ ls

[email protected]:~# mkdir Test
[email protected]:~# ls
Desktop    Downloads  offlineimap  Public  Templates  Videos
Documents  Music      Pictures     snap    Test       wordpress

Now we’ll enter into Test directory:

~$ cd Test

Again check the path using ~$ pwd and list of the files in it using ~$ ls

[email protected]:~# cd Test
[email protected]:~/Test# pwd
/root/Test
[email protected]:~/Test# ls
[email protected]:~/Test#

The directory path is “/root/Test“. The directory is empty.
Let’s make a file named “my_first_file.txt
~$ nano my_first_file.txt                           
Time to write something in it “Hi, I’m Sakib. This is a command-line tutorial.”


  GNU nano 4.3                   my_first_file.txt                    Modified  
Hi, I'm Sakib. This is a command line tutorial.




^G Get Help  ^O Write Out ^W Where Is  ^K Cut Text  ^J Justify   ^C Cur Pos
^X Exit      ^R Read File ^ Replace   ^U Paste Text^T To Spell  ^_ Go To Line

CTRL+O and Press “Enter” button to save and CTRL+X for the exit. Commands tutorial for Nano is coming soon.

Let’s print the text in terminal :

[email protected]:~/Test# nano my_first_file.txt
[email protected]:~/Test# cat my_first_file.txt
Hi, I'm Sakib. This is a command line tutorial.
[email protected]:~/Test#

That’s all for today. I’ll come another day with more useful commands. Practice yourself as more as you can.

Md Sohanur Rahman Sakib

For me, life is like a line. Line of a circle where my presence is just like a dot. A dot, which has value or maybe hasn't!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Articles

Nokia Upcoming Harmony OS Device

Nokia Upcoming Harmony OS Device

Nokia is going to launch their new mobile phones Nokia X60 and X60 Pro this year. These two devices are expected to be the first Nokia phones equipped with Huawei HARMONY OS! Nokia X60 and X60 pro both screen will be curved screen and is equipped with a large 6000mAh...

read more

Related Articles

Do You Really Need Rooting Your Android Smartphone In 2021

Do You Really Need Rooting Your Android Smartphone In 2021

Android is the world's most used mobile operating system. But Android has some hidden features that general users cannot access by default. To access those features, users need to go through a process called Rooting. What's Rooting? Rooting allows users of the Android...

read more

Pin It on Pinterest

Share This