Request a Call Back
X
Fields marked with an * are required
13 Basic Linux Commands for Beginners to know - Habilelabs

There are thousands of Linux commands. In this article, we will discuss 13 Basic Linux Commands for Beginners need to know.

Basic Linux Commands, Beginners Should Know:

Let’s discuss 13 commands one by one:

1. pwd command:

pwd is used to know that in which directory, we are working i.e. the full path of the current directory.

2. mkdir command:

It is used to create a directory.

Syntax:

e.g.-

3. cd Command:

It is used to change the directory path.
Syntax:

e.g.-

Note: cd command is also used to go one step back

4. ctrl-L command:

It is used to clean/clear the terminal.

5. touch command:

touch is a multipurpose command, first use is to create empty single/multiple files(s).
Syntax :

e.g.-

secondly, it is used to change file access and modification time, for this touch command has 5 options.

5.1: -a

It used to change the access time of the file.
e.g. –

The following command sets the current time and date in a file. If the demo file does not exist, it will create the new empty file with the name.

5.2: -c

Do not create a specified file if it does not exist.
e.g.-

For e.g., this command will not create a file called demo if it does not exists.

5.3: -m

Changes the modification time of file
e.g.-

5.4: -r

Used to use the corresponding time of the second file instead of current time.
e.g.-

In this example, file “demo” will use the timestamp of file “test” instead of the current time stamp.

5.5: -t

Used to create a file with specified time rather than current time
e.g.-

Field Explanation:

touch command with -t option will give the demo file a time stamp of 10:30:40 a.m. on August 01, 2017.

(time Use the specified time instead of the current time. time will be a decimal number of the form:

[CC]YY]MMDDhhmm [.SS]

MM – The month of the year [01-12].

DD – The day of the month [01-31].

hh – The hour of the day [00-23].

mm – The minute of the hour [00-59].

CC – The first two digits of the year.

YY – The second two digits of the year.

SS – The second of the minute [00-61].)

6. -ls command:

It used to show the list of file.
Syntax :

Note: If you want comma separation between file names, then use ls -m instead of ls -a.

ls -1: to display one file per line
Syntax :

ls -l: to display total information about files/directories
Syntax :

Field Explanation
1) The first character displays the type of file.
* “-” Normal file
* “d” Directory
* “l” link file
Next 9 lines specify the permissions. Each group of 3 lines corresponds to permissions. So first three lines stand for user permissions, next 3 for the group and next 3 are for others permissions. Here r stands for reading, w for write and x for execute.
2) The second field specifies the number of links for that file.
3) The third field specifies the owner of the file. Here owner is “user”.
4) The fourth field specifies the group of the file. Here group “nitisha” belongs the file.
5) The fifth field specifies the size of the file. Here file size for the file a.txt is 12 bytes.
6) The sixth field specifies the last modified date and time of the file. Here for file a.txt is July 1 23:11
7) Seventh Field specifies the name of the file/directory itself.

ls -a : to show hidden files
ls -t : to open last edited file

7. -cat command:

It used to display the content of the file.
Syntax :

e.g.,

Note: It will show the content of file “demo”
It is also used to display content of more than one file
Syntax :

e.g.,

cat command is also used to redirect output to another file, but with ‘>’ operator

We can also redirect the stdout to a new file with ‘>’ operator

Now if we check the content in demo.txt with

then, we’ll get the result –

It is also used to append some content in the file with ‘>>’ operator

7.1: -cat -n used to display content of the file with Line numbers

To find the exact number of filled lines we use ‘-b’ instead of ‘-n’.

7.2: cat -ns used to print repeated empty lines only once
7.3: cat -ne used to display end of every line

Syntax :

8. -man command:

It is used to get details of any command.
Syntax :

9. -whatis command:

It is used to get short details of any command
Syntax :

10. -whoami command:

it is used to know the current user name.

11. -rm command:

this command is used to remove the file.
Syntax :

11.1: rm -r : to remove directory

11.2: rm -f: to remove file forcefully

11.3: rm-rf : to remove directory forcefully

12. -cp command:

It is used to copy the content of one file to another.
Syntax :

13. -mv command:

used to move(cut-paste) the content of one file to another
Syntax :

This command is also used to rename the file
Syntax :

So if you are a beginner then you can use these “Basic Linux Commands for Beginners”.
These commands will help you out to start with Linux operating system. Visit this 100 Linux command tutorial for more info.

Habilelas is best web and mobile based development company. If you have anything to build, discuss with us.

If you have any queries then ask in the comment section.

Hope you found this post helpful, so don’t forget to share with friends on Facebook.

What others say about us

iSEEit has been closely working with Habilelabs team ever since our company needed to step up development efforts. Being a rapidly evolving software company, we have come across a multitude of challenges over time but Habilelabs has proactively solved issues impacting the business and handled the continuous releases of the applications without downtime. We are very satisfied and happy to have found Habilelabs as our offshore development partner as they have developed a good understanding of our own vision and work flows.

We really appreciate their flexibility, agility and eagerness to learn as they grow, and we would undoubtedly recommend their services to anyone.

iSEEit

Rizan Flenner

Amazing and skilled team we been learning from each other for quite some time, and still working together.
Always available and ready to make great results, or to improve unexpected problems.

Siquo

Daniel White

https://www.siquo.com/

I am very pleased with the work Habilelabs provides. Every time we have worked, projects were delivered on time. They provide great support and I would totally recommend Habilelabs to anyone that wants to get a project done on time and professionally.

Tableluv

Xenophon Kanarios

http://tableluv.gr/

Habilelabs is an excellent and affordable programming team that delivers fast results.

Paiusa

Stephen Blaney

http://www.paiusa.com/

Good mindset, good technical competence and skills, always fix problems when needed.

Denthub

Arash Fard-Rahmani

We have been extremely satisfied with the project that has been delivered by Habilelabs. They are very professional with great commitments. Quality of communication and problem solving skills were perfect.

Safak Korkut

Very much satisfied the work. Team quickly understood the requirements and completed work on time. Would definitely recommend him. We will like to hire them again

Stanislav M.

Habilelabs is the definition of professional and friendly. They knew exactly what they are doing and never shy to share their knowledge. We will definitely consider hiring them for future projects! Great Work!

Eben B.

Great work, will hire team Habilelabs again. I appreciate the extra effort. Excellent work as always.

Saasmath

Very fast and professional Team. They knows exactly what needs to be developed to achieve the project goal. We will hire them again

Mediaroot

Very good work, Little expencive for us but prefere to work with them because I'm sure the work will be done 100%

ProwebMedia

Team habilelabs is a pleasure to work with and we will work with them again. They are professional, easy to communicate with, and completes tasks on time and on budget.

KCRW

Really impressed with the high quality work and professionalism!

Vaibhav Samadhiya

We worked Habilelabs team and they are very professional, motivated and experienced developer. I would love to work with them in the future again!

Mahdishahadat

We had a great collaboration with Habilelabs. They are very communicative, extremely competent and responsive. We are looking forward to continuing our collaboration with Habilelabs. I recommend them with full confidence.

Safkutkorfak

I'm very impressed with work quality. Habilelabs shows outstanding performance and knowledge in area needed for our project. I'm fully satisfied with Habilelabs's service. Will look for more opportunities to work with them

AdramMedia

Team habilelabs are truly great developers to work with, and ensure that the work is completed to the highest of standards. Real pleasure to work with would highly recommend for Node.js / React.js work.

Liamsm

Habilelabs is a fabulous company. Excellent in quality and always available for communication. We hired Habilelabs team for doing the frontend of my application and they gave me some good tips about backend APIs as well, which tells a lot about their overall expertise. Really appreciate their sincerity, timely delivery and professionalism. Will definitely hire them again in future.

Atul Shrivastava

very good very profasional, They did good job on time +++

Moshe Levy

Love the Company Habilelabs . Knew thier stuff and really came through for me.

Zehash

5 stars work, very good communication, timely delivery.

Anthony Hu

iSEEit has been closely working with Habilelabs team ever since our company needed to step up development efforts. Being a rapidly evolving software company, we have come across a multitude of challenges over time but Habilelabs has proactively solved issues impacting the business and handled the continuous releases of the applications without downtime. We are very satisfied and happy to have found Habilelabs as our offshore development partner as they have developed a good understanding of our own vision and work flows.

We really appreciate their flexibility, agility and eagerness to learn as they grow, and we would undoubtedly recommend their services to anyone.

iSEEit

Rizan Flenner

Amazing and skilled team we been learning from each other for quite some time, and still working together.
Always available and ready to make great results, or to improve unexpected problems.

Siquo

Daniel White

https://www.siquo.com/

I am very pleased with the work Habilelabs provides. Every time we have worked, projects were delivered on time. They provide great support and I would totally recommend Habilelabs to anyone that wants to get a project done on time and professionally.

Tableluv

Xenophon Kanarios

http://tableluv.gr/

Habilelabs is an excellent and affordable programming team that delivers fast results.

Paiusa

Stephen Blaney

http://www.paiusa.com/

Good mindset, good technical competence and skills, always fix problems when needed.

Denthub

Arash Fard-Rahmani

We have been extremely satisfied with the project that has been delivered by Habilelabs. They are very professional with great commitments. Quality of communication and problem solving skills were perfect.

Safak Korkut

Very much satisfied the work. Team quickly understood the requirements and completed work on time. Would definitely recommend him. We will like to hire them again

Stanislav M.

Habilelabs is the definition of professional and friendly. They knew exactly what they are doing and never shy to share their knowledge. We will definitely consider hiring them for future projects! Great Work!

Eben B.

Great work, will hire team Habilelabs again. I appreciate the extra effort. Excellent work as always.

Saasmath

Very fast and professional Team. They knows exactly what needs to be developed to achieve the project goal. We will hire them again

Mediaroot

Very good work, Little expencive for us but prefere to work with them because I'm sure the work will be done 100%

ProwebMedia

Team habilelabs is a pleasure to work with and we will work with them again. They are professional, easy to communicate with, and completes tasks on time and on budget.

KCRW

Really impressed with the high quality work and professionalism!

Vaibhav Samadhiya

We worked Habilelabs team and they are very professional, motivated and experienced developer. I would love to work with them in the future again!

Mahdishahadat

We had a great collaboration with Habilelabs. They are very communicative, extremely competent and responsive. We are looking forward to continuing our collaboration with Habilelabs. I recommend them with full confidence.

Safkutkorfak

I'm very impressed with work quality. Habilelabs shows outstanding performance and knowledge in area needed for our project. I'm fully satisfied with Habilelabs's service. Will look for more opportunities to work with them

AdramMedia

Team habilelabs are truly great developers to work with, and ensure that the work is completed to the highest of standards. Real pleasure to work with would highly recommend for Node.js / React.js work.

Liamsm

Habilelabs is a fabulous company. Excellent in quality and always available for communication. We hired Habilelabs team for doing the frontend of my application and they gave me some good tips about backend APIs as well, which tells a lot about their overall expertise. Really appreciate their sincerity, timely delivery and professionalism. Will definitely hire them again in future.

Atul Shrivastava

very good very profasional, They did good job on time +++

Moshe Levy

Love the Company Habilelabs . Knew thier stuff and really came through for me.

Zehash

5 stars work, very good communication, timely delivery.

Anthony Hu