An A-Z of Linux – 40 Essential Commands You Should Know

A Z Linux Commands   An A Z of Linux   40 Essential Commands You Should KnowLinux is the oft-ignored third wheel to Windows and Mac. Yes, over the past decade, the open source operating system has gained a lot of traction, but it’s still a far cry from being considered popular. Yet though that may be true, Linux still earns new converts every day. Will you join them?

The learning curve of Linux is what deters most users from even trying it in the first place. It can be a traumatic experience having to go from a GUI-based operating system like Windows or Mac to one that requires command line fiddling. But if you can get over that initial hump of difficulty, you may find that Linux is surprisingly robust.

If you want a crash course on all that is Linux, we’ve got a great Linux newbie’s guide that will teach you all you need to know. For the rest of you who just want a brief overview of some important commands you ought to know, the following list is all you’ll need.

Newbie Commands

cd - Changes the current working directory in the command line console.

exit - Exits out of the current program, terminates the current command line terminal, or logs you out of a Unix network depending on the context.

kill - Terminates the specified running process. The Linux version of Windows’ “End Process” in the task manager.

ls - List all of the contents of a specified directory. If no directory is specified, it will use the current directory.

man - There’s a running gag in the Linux community that man is the only command you need to know. It stands for manual, and it will give you detailed information on commands and aspects of Linux.

pwd - Displays the current working directory for the command line terminal. Good for when you’ve lost track of where you are in your system.

reboot - Immediately stops all running processes, shuts down the system, then reboots.

shutdown - Stops all running processes and shuts down the system. Parameters can be specified to issue a delayed shutdown or a shutdown at a particular time.

sudo - Runs commands as root, which means no limitations due to permissions.

linux system info   An A Z of Linux   40 Essential Commands You Should Know

System Information

date - Prints out the current system date and time. Specified parameters can change the format of the output.

df - Reports the disk space usage for the file system.

hostname - Displays the name of the current host system.

ps - Displays information about all of the processes currently running on the system.

quota - Displays disk limits and current disk usage for a specified user. Useful when there are multiple users assigned to a particular system.

top - Displays all of the top processes in the system, by default sorted by CPU usage.

uptime - Reports how long the system has been running since last boot. Extremely useful for servers.

linux folder files   An A Z of Linux   40 Essential Commands You Should Know

File Manipulation

bzip2 - Compresses specified contents into a .bz2 archive or extracts from a .bz2 archive depending on parameters.

chmod / chown - Changes the access permissions of one or more files (chmod) or changes the ownership of a particular file to a new user (chown). Only users with permission or ownership of a file can change that file’s permissions or ownership.

cp - Copies files to a new location with a new name depending on the parameters. Can copy directories too, whether recursively (includes all subdirectories) or not.

find / locate - Searches the system starting at a specific directory and matching all files within that location to a set of conditions laid out by the command parameters. Very useful for quickly finding certain files.

grep – Searches through all of the files in a specified location trying to find files that contain lines that match a given string. Returns a list of all the files that scored a match.

install - Used in conjunction with Makefiles to copy files from one location to the system. Not to be confused with installing packages from a software repository.

mkdir / rmdir - Creates a directory (mkdir) or deletes a specified directory (rmdir). Directories can only be created and deleted within directories that you have permission in.

mv - Moves files and directories to another location. Can be used to rename files and directories by keep their source and destination locations the same.

open – Opens a specified file using the default system application for files of its type.

rm - Remove and remove directory. Used to delete files and directories from the system, whether one at a time or in batch.

tar - Creates a .tar archive or extracts from a .tar archive depending on specified parameters.

zip / unzip - Creates a .zip archive or extracts from a .zip archive depending on specified parameters.

linux nano   An A Z of Linux   40 Essential Commands You Should Know

Other Noteworthy Commands

apt-get – Advanced Packaging Tool. Use this command to install, remove, and configure software packages on your system. For a menu-based version, use aptitude command. Available on Debian-based Linux distributions.

ftp / sftp - Connects to a remote FTP server in order to download multiple files.

wget - Downloads files from the Internet at the specified URL to your system.

yum - Yellowdog Updater, Modified. An open source package manager used to easily install software packages from repositories. Available on RPM-compatible Linux distributions.

emacs – One of the most well-known text editors on Unix-like systems.

nano - A newbie-friendly command-line text editor that uses keyboard shortcuts to simulate menus.

vim - Vim is the successor to Vi, both of which are command line text editors for Unix-like systems. Though Vim is popular, it doesn’t use menus or icons for its interface so it has a reputation for being newbie-friendly.

Image Credits: Folder Via Shutterstock, System Via Shutterstock

Check out more about:

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.



I think what you meant was, [Vim] has a reputation for not being newbie-friendly.

Besian Cato

:p vim would make a newbie turn linux down :p

Joel Lee

Oops, you are correct. My mistake. Thanks for pointing it out.


I knew them all, am I a geek? =D

Ihtisham ul haq haq

I think you might not,but don’t think I am jealous of you…:D

nolan quigley

|>man woman |
| |
|no manual entry for woman |
|_______________________ |

damn skippy!!!

William Hill

HAHAHA!!! Greatness ;D

nolan quigley

damn… the ascii didnt come out right…

Tarek Ramadan

I think most of us knew a lot, but thanks for the new

Efi Dreyshner

man – the most important command :D

Knut H. Flottorp

yes – if you have the manual pages installed, the system is fully documented. “man” is the command that display an explanation, and probably is the most important command…

Efi Dreyshner

I think that most distributions coming default with this package (:

Catherine McCrum

Question: I use Ubuntu – do these Linux commands apply to Ubuntu as well?



Catherine McCrum

Thank you Chetan & MakeUseOf for all your great advice and reports.

Sazzad Hossain

but the shutdown command doesnt in ubuntu.
that uses halt ; perhaps
sudo halt
to shutdown
& sudo reboot to reboot or restart !


shutdown -h x (x = number of minutes to wait until shutdown)
“shutdown -h now” or “shutdown -h 0″ to shut down immediately.
“shutdown -r now” to reboot immediately.
You can also try “telinit 0″ or “init 0″ to shutdown and “telinit 6″ or “init 6″ to reboot iirc.
And don’t forget to type sudo in front of those commands or to login as root first.

Rick Stanley

Despite what Unbuntu would like you to believe, Ubuntu IS LINUX!!! There are some minor differences between them and other Distros, including Debian, which is the Distro that Ubuntu is based on, but the commands listed in this article are relevent to ALL Linux Distros.

Catherine McCrum

Thanks Rick, my Hubby & I are learning the terms. Some make sense as I was once a DOS user and they seem somewhat similar.

Catherine McCrum

Harish Jonnalagadda


Igor Rizvi?

The first thing Iv learned is apt-get command,thanks for postng this

Knut H. Flottorp

Never use “apt-get” or any other command line to install things.
Use Synaptics on Ubuntu or another Application manager that is supplied with the distro..


“Never use “apt-get” or any other command line to install things.”

I have seen you make that statement a few times in other threads. Could you please explain why you say that.


Because these put a lot of effort into verifying the packages, way beyond what “apt-get” can do. More important is that if Linux is to be used in a corporate environment, these application managers allows the system administrator to further restrict downloads and ensure that the systems works.

The big problem with Linux is the instability introduced by people that believe they know enough, install untested software and then later blames Linux when their system goes belly up. When posting, commenting and writing about Linux, consider stability and consistency, and how this can be improved. One comment is that what is called “Commands”are really applications that interface the kernel to get things done – “ls” list the files. Just this indicates a rookie author and should rais e a red alert to any competent reader. The “shell” that executes the applications does so in a sequence, can branch and use the result of one as input to another. These scripts are text file that is made executable. Any serious Linux user has made scripts for simple chores, but novice user should not believe they can behave like on Windows. Knowing 20 “commands” does not make you competent. Use a tool that others can monitor.


In a properly set up corporate environment, as a matter of policy, the end-user would not have access to command line and no package managers such as Synaptic would be installed on his or her PC. All changes are performed by the sys admin staff. So, in a corporate environment, the question of which tools the end-user utilizes, CLI or GUI, is moot. (S)he is not allowed to use any.

I believe the target audience for this and other MUO articles is the individual home user, not the corporate system administrator. These articles are meant to educate and instruct home users. So your advice to use GUI tools rather than CLI, while valid, goes against the educational intent of these articles. I agree with you that Linux commands can do a lot of damage, even make a system totally inoperable, if used improperly. However, when used properly they provide a much better control over the system than GUI tools. There are things that can be done with “apt” that cannot be done with Synaptic.

BTW – GUI tools do not prevent you from damaging a system, they just make it a little bit harder.


Ok – we disagree. This is not Windows, and here Application Managers are made so that a System Administrator can set up repositories of safe code that users can download and use – even games without having to go around and inspect every PC. They can also ensure that updates that are mandatory are updated, while some patchwork that is daily sent for the users to test, can be withheld from the users and be tested by qualified people first, who can charge for the QA/QC done, and the results can be logged, bugg reports filed and the system remain trusted.

There are functions in the “apt-get” that is related to the OS/distro that cannot be done by an Application Manager – nor does this allow the user to peek into installation logs. But again, this is not Windows, people need appplications, so why not use it?

A Partition Editor is a GUI tool that can do a pile of damage. The Linux variant that Ubuntu use is also used on MacOS, and can do a lot of damage – just that the MacOS variant can only cope with hsf/hfs+, and DOS/NTFS partitions.

Finally “CLI” – or “Cammand Line Interface” is a shell – “/bin/bash” with functionality not mentioned in the article. Anyonw can make their own shell – like kde, with specific functionality that suits them such as added security. I know of one modified variant of bash that silently may be used for all remote access to the system and monitor what is done.

Dotan Cohen

VIM has a reputation for being newbie-friendly? Perhaps, but it is very picky about who it’s friends are!

Joel Lee

Haha, I made a typo!

Anandu B Ajith

Advanced Commands For Users Please


I used to know a little dos but I didn’t start using Linux until I could barely format a hard drive and install windows 2000. Since then I’ve done very little to NO command line work to run Linux (mostly Ubuntu which I currently installed from a .exe from inside windows 7). Mostly what I know of those commands in this article is from watching the installers and packagers etc run automatically.
So you can see: I have waited for linux to evolve so that i can run it easily without command lines. Therefore i question the premise of this article that says you need to know them to use linux. I bookmarked this page but I don’t know if i’ll need it anytime soon. Right now i only run windows when my hulu doesn’t play right in linux ubuntu.
I suppose i should feel guilty that I don’t contribute to the code by using it without machine languages coming out my ass but maybe you could suggest another means.

Lisa Santika Onggrid

Nowadays you can use Linux without touching the command lines, but knowing them would certainly makes your life easier.
No harm in learning, yes?


Well the only real problem lies in the idea that you HAVE to know these things to be able to use Ubuntu (for example). I suck at stuff like this and that is basicly what kept me in windows until about two months ago (when my Vista crashed for the umpteenth time).

I switched to Ubuntu – which I’m sure is a horrible bloated mess compared to other versions of Linux – and its about as user friendly as it could possibly get. In two months time I’ve managed to learn how to use that, when to use the terminal and a bare minimum of commands there.

If I had known that it was THIS damn easy to use it I would have switched earlier. But the constant nagging about how I must be able to use commands just put me off.

(Don’t get me wrong – I love articles like this because atleast I can *try* to learn stuff like this but I would love for there to be like a large sign saying “THIS IS GOOD TO KNOW BUT YOU DON’T HAVE TO KNOW IT” to help all us helpless morons to realize its not high sorcery to switch to something better, faster, nicer)

Lisa Santika Onggrid

Calm down:)
As a Linux beginner myself I see your point. That sign is so hilarious. Actually, why not write your experience and post it so you can tell more people how easy it is?
I was surprised to see how intuitive Linux could be, though my distros of choice are Mint and Slacko Puppy. I haven’t touch any command lines yet.


haha I’m calm I’m calm … :)

Well I’ve been working on this “Why the hell did I stop using Photoshop and Windows” thing as a comic (I work as an illustrator and my move from Windows to Linux involved a switch from CS aswell (It works in Wine but not so great))

… anyway I got allot of hoo-haa from other illustrators and designers about why in heavens I would want to switch to “an incredible difficult OS” and “badly done amateur-graphics-software”.
(I tried to point out that they use some of those programs themselves, they are just not aware that they are free and open source. Or that fixing constant poop-dumps in Vista are way more complicated than installing and tweaking in Ubuntu – put to no use. So I thought a comic may be a better route)

Also I kinda need to stick to Ubuntu now – I’ve fallen in love with it and want to take it home. Also it seems Steam (the only thing I miss from Windows) will be released aimed first at Ubuntu… and I’m a sad sad Counter Strike geek. :)

Lisa Santika Onggrid

That’s an interesting project. Post the link if you’re finished.
A lot of FOSS are actually done by professionals so they’re kinda off. It’s understandable though, given that people would likely defend their view on ‘value for money’ after all they forked out.

I’ve ventured to FOSS world for a while before trying Linux. You’re right. Most people use those softwares without knowing they’re FOSS.

You’re not alone. The only thing keeping me from jumping the ship entirely is because I can’t play my games in Linux.


You don’t HAVE to know these commands to use linux. Can you give an example of what you can’t do that these commands enable?

Don’t stress about it, the GUI is your friend (well, Ubuntu Unity is another story, but I digress), you can do all of the things these commands can do via the GUI.

Good luck, and good for you for breaking the mould.


Thanks for this article. Starred it.


Want cookies?

Joel Lee

You’re welcome. Glad you found it useful.

Dmitriy Haralson

i knew 10, give or take

raymond mcnatt

Thanks again MOU. I’ve been using Linux on laptop for about two weeks

Lisa Santika Onggrid

You also have my thanks MUO. I’ve been using different flavors of Puppy and some Mint in my USB to see which will play nice with my hardware. This will help my beginning with Linux.

Joel Lee

I love Mint! I hope your journey into Linux is fun and fruitful. :)

Lisa Santika Onggrid

Mint is great! Slacko deserves a praaise too.
So far, aside from my own learning experience I’ve also sparked some interests from my friends. They’re commenting: “So this is Linux. Hey, it doesn’t look so much different than Windows, and it can do what I wanna do with my computer.”
Once I can convince them than booting from USB won’t harm their files they’re actually willing to try.

Hope I can gain new converts to share this experience with.

Knut H. Flottorp

Most new applications originates from Linux, where they are tried and tested – and then “ported” to (in particular) MacOS and Windows.

The main difference is that Linux is complete and you can learn technology as opposed to wizardry of Windows. A good argument to convince them to make the move is that on Linux you can forget the “viruses” and the “trojans” and the virus scanners. Well, it comes with a scanners… should they want it.

Joel Lee

You’re welcome. Stick it through. Linux can be great when you get used to it.


A very small but usefull bite of linux commands

Patrick Jackson

A good article, especially for those beginners to the world of Linux.

Brian Mok

Just what I was looking for. Thanks! :)

prateek pandey

never try ” rm -rf / ” . It will delete all files starting from the root directory !!!!

Knut H. Flottorp

Most distro will limit that command to “root” only and ask for you to confirm.

The same does not apply to MS Windows.

MOo NEi Ra

useful thanks ;)

Nikhil Chandak

these commands seems to be amazing
but , I dont have Linux , so….
If i will hv Linux in future , I will definitely use these commands
but thnx ..


i wished to know wat command in ubuntu helps to track if my pc was havin a usb attached to it n can dat info be completely be removed from system?

Knut H. Flottorp

type df

.. and somewhere it will show the mounted USB stick.

Use “umount ” and then you can remove it.

owais nauman

nice post.owais

Gerhard Tinned

That is a nice list! Its the absolute basics but its a god list of the most important ones. But i have to agree, VIM is not the best editor for a newbie to start with.

Tan Nguyen Nhat

Very useful! I’m using Ubuntu now, It’s so professional when I use those commands, haha,

Ritwick Saikia

“startx” for when your GUI fails and it falls back to command line mode. It basically starts up the GUI mode again. It saved me from reinstalling Linux.

Knut H. Flottorp

Honestly, you have to drop the nuisance of command shell as a requirement for Linux. If so, it is also required for Windows, just start the “Terminal” or “X/11″ on Mac, and then the commands are just the same. “cd” changes directory on Windows, on Mac and on Linux.

Linux is fully GUI based, and there is no need to know any “commands” – but you you can, and then store them in one file, run them as any other command – with some advance knowledge, you can link them to a window, and make choices execute these commands and thus make a new application. You can do that on MacOS – and even Windows. The main difference is that on Linux and MacOS the system remains fully protected, on Windows, you have it all exposed. That is the huge difference.

Isidoro Lopez

Very Useful, The essential commands

William Hill

yes, VIM is definitely not user friendly. Most people have never encountered a bi-modal text editor.


thanks , learn some new commands

Eryke Schexnayder

Good Starter Kit

Brandon Ragoo

Linux is a beautiful, powerfull and amazing OS don’t get me wrong but I
certinatelly dont think I am will to make the switch at this moment in
life. You see when using Linux as a primary OS you definately have to learn
the commands to use in he terminal as a technication or some other person in
the field of IT. I mean sometimes I do consider taking the time to learn the
commands but as a technication it definatelly affects me in a bad way. The
more time I spend away from Microsoft using Linux I start to forget how to
navigate through Windows inorder to use different features to solve problems.
If I as a technication use forget how to navigate through Windows it will
not make me look like a professional haveing to playaround with someones laptop
inorder to find a certin feature or even worse if the customer has to remind me how to get to
that feature. Trust me it happens after using Linux for even a short period of time.
Besides that when a student goes to school to study any software the student
is required to use will be made for Windows only most of the time, even if there
is a version of the software available for Linux or Mac the teacher will be teacher
will be teaching you to install and use it on Windows. For example we are using a
program called WAMP in school to learn php programming, I tried installing
that on Linux after the installing it in Windows and if u dont know any Linux
commands it just pain to install the program. The teacher in school also
diden’t know to install it in Mac when a student asked so I would not
of even bothered asking him about installing it on Linux.
My point is besides making the effort to learn the commands those are
some other things you will have to take into consideration.
Just to be clear I will say it from now I am not in any way bias towards
Linux, in face when I heard about it for the first time I loved it,
I installed Ubuntu, customized it and showed everyone in school how cool
it was, when u use Linux for the first time u feel cool, but after some time
when u gain the knowledge of why most ppl dont use it u understand it dosen’t
make you cool. Anyone reading this is free to use Linux it has it advantages
and disadvantages I just wanted to let you know why I choose not to use it
despite the fact that I constiantely think about it at times.


Sorry – but you are a novice to Linux.

The “Commends” that are described above is “applications” that access the kernel to get things done. All applications are executed in a shell, usually The Bourne Again Shell – “/bin/bash”. Applications all have an exit value 0 or False or 1 or some error code or TRUE. Once you find a smart way you can write a “script” – where the result of one application may be fed into another, they can be done at the same time, after one another and you can branch according to what happens resulting in a new a “application” by just making it executable.

Linux and MacOS is based on a pile of these script, press a button on a screen, and you may start one. Consider as if Windows .Net was just VBA – and you have it. Just that the basic structure on Linux is “C” – and “Regular Expressions”. Learn “awk” and “Perl” and study Bash – then you can play with “commends” and basic line-oriented applications. Then use Python to access your scripts through a graphical UI. Soon you will forget the “commands” on Linux – they are all in /bin, and described in the manual pages – type “man” a space and the command or standard application you want explained – like “ls”.

“man” may be the most important “command”. All is organised according to strict system of rules, what goes where is not random. On Linux you have no use for these command shells, unless you make scripts. Use the graphical interface to configure Linux, find and install applications and get things done. I have consultants that really know Linux, they do not use “commands”, not even to comile and link the code – they use the graphical tools that run “make” and SCCS and the rest. Why should a novice user need to know? The only answer is that they are curious to see if the same exists on Linux and MacOS. Type “ls” and -a gives you also the hidden file, and -l the long variant where you can see that only you can read a file, you can hide it from “root” – everyone else. And you have to grant is “x” rights for it to be run as a script – so a jpeg file that is “x” may be malware. That simple.


hmm, I would add:
./configure make make install.
su – username

Pwince Khan

nice article

Rigoberto Garcia

Excelnet Joel. Share with my friends. Thanks…

Atif Hussain

comprehensive solution for most of basic problems