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                                                

root@sakib:~# pwd
/root

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

~$ ls

root@sakib:~# 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

root@sakib:~# mkdir Test
root@sakib:~# 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

root@sakib:~# cd Test
root@sakib:~/Test# pwd
/root/Test
root@sakib:~/Test# ls
root@sakib:~/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 :

root@sakib:~/Test# nano my_first_file.txt
root@sakib:~/Test# cat my_first_file.txt
Hi, I'm Sakib. This is a command line tutorial.
root@sakib:~/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

Get Up To 820 GB of Cloud Storage for Free

Get Up To 820 GB of Cloud Storage for Free

Cloud storage is the most using online storage system nowadays. Treasure is one of them. Treasure gives 10 GB free cloud storage after signing up for a new account. Besides, it also provides 10 GB extra while anyone using a referral link to sign up. So, use the direct...

read more

Related Articles

Solution of Failed to Mount /Media/Cdrom

Solution of Failed to Mount /Media/Cdrom

In a new system, we can face problems in our daily life. As a Linux distro user, I'm facing issues regularly and try to solve them. I feel happy to share the solution in my blog which is about failing to mount Cdrom. Problem: Recently I faced an issue while trying to...

read more
Why Charging Your Phone 100% is Bad

Why Charging Your Phone 100% is Bad

Today we will explain Why charging our phone to 100% is bad. What actions we can take. It's necessary to know as we are using a smartphone. So, we need to be smart. Most of us charge the phone to 100% overnight when we go to sleep. Even it doesn't take that much time....

read more

Pin It on Pinterest

Share This