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.

Recent Articles

Python – All-Rounder in Programming World

Python – All-Rounder in Programming World

Today, we are talking about a programming snake. Wait a bit! Don't be tensed! It's not a snake. But the programming language which I'm going to represent you has the name of a snake! It's Python. What is a programming language? A programming language is the language...

read more
Scams And Scammers In The IT Industry

Scams And Scammers In The IT Industry

It's not a big deal to have scams and scammers in the IT industry nowadays. The game of scamming had been started a long time ago by targeting the people who are unwilling about this matter. The worst thing is, most majority of our communities are not aware of it....

read more
Top 5 Features that iOS 14 brings to iOS

Top 5 Features that iOS 14 brings to iOS

iOS 14 is called the biggest refresh of iOS. It’s the refresh of iOS 13. It brings many new and big features to iOS. Let’s look at the top 5 Features of iOS 14 — 1 . App library— Finally, Apple brings app drawer which is called app library in iOS 14. 2 . Widgets —...

read more

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 *

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