Learn Basic Linux Commands!

Utshab Kumar Ghosh
2 min readNov 24, 2020

--

Whenever you are a newbie to Linux, especially a Windows user, become afraid and discouraged about how to cope up with the Linux commands. Trust me, it’s not that tough. I had the same feeling when I started to practice on Linux. The truth is, the more I surfed, the more I started to like the commands. So, what should we know as a beginner on a Linux shell? Ok, let’s see.

Linux is FUN!
  1. First of all, we are in the home directory, when we open the shell, right? So how can we check the path of a directory? It’s easy!

pwd

Now let's dive into more!

2. To navigate through the Linux files and directories, use:

cd <directory_path>

It works with both the absolute path or the name of the directory in a folder.

e.g. cd home/ubuntu/newbie will take you to the newbie folder.

Some more work to do with cd:

cd .. [move to the parent directory]

cd ~ [go straight to the root of ubuntu]

3. To view the contents of the current directory:

ls

To view the contents of another directory, simply type:

ls <dir_path>

Some more to do with ls:

ls -R [list all the files in the sub-directories too]

ls -a [show the hidden files]

ls -al [list the files and directories with detailed information like the permissions, size, owner, etc.]

4. To copy files from the current directory to a different directory:

cp <filepath> <destination_path>

Use mv instead of cv and you will end up moving the file. Also to rename files:

mv <oldname.ext> <newname.ext>

5. To make a new directory :

mkdir <directory_name>

To delete anempty directory:

rmdir <directory_name>

Use rm instead to delete anything.

6. To create a blank new file:

touch <file_name>

7. To edit files:

nano <filename>

I will write more on this in the next parts of this seris. Till then, practice them. Tada!

References:

  1. Image is taken from http://www.lastnewstoday.net/news/linux-desktop-market-share-increases/
  2. https://www.hostinger.com/tutorials/linux-commands

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Utshab Kumar Ghosh
Utshab Kumar Ghosh

Written by Utshab Kumar Ghosh

Passionate about Python, Image Processing, Computer Vision, Data Science, Machine Learning, and Deep Learning.

No responses yet

Write a response