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

Facebook Sound Collection: Get Copyright-Free Music

Facebook Sound Collection: Get Copyright-Free Music

If you are a content creator on Meta's platforms, this article is for you. Today, we are going to discuss Meta's feature, which is the Facebook Sound Collection. We won't face copyright-related issues by using music from here for our projects. It's free with a ton of...

read more

Related Articles

How to enable cGroups v2 in AlmaLinux 9

How to enable cGroups v2 in AlmaLinux 9

AlmaLinux is becoming popular day by day for the server-side OS. Besides, cGroups v2 plays a significant role in managing resources! Based on the necessity to have cGroups v2 enabled in AlmaLinux, today we will learn how to enable cGroups v2 in AlmaLinux 9. What's the...

read more

Pin It on Pinterest

Share This