Pinterest Stumbleupon Whatsapp
Ads by Google

linux commandsLinux 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.

Ads by Google

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 commands

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.

basic linux commands

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 commands

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

  1. Atif Hussain
    November 23, 2012 at 10:32 am

    comprehensive solution for most of basic problems

  2. Rigoberto Garcia
    November 2, 2012 at 8:59 pm

    Excelnet Joel. Share with my friends. Thanks...

  3. Pwince Khan
    November 2, 2012 at 6:44 pm

    nice article

  4. Skee
    November 2, 2012 at 2:19 pm

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

  5. Brandon Ragoo
    November 2, 2012 at 1:33 pm

    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.

    • Knut
      January 30, 2013 at 1:51 am

      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.

  6. Eryke Schexnayder
    October 31, 2012 at 9:18 pm

    Good Starter Kit

  7. Adi
    October 31, 2012 at 4:53 am

    thanks , learn some new commands

  8. William Hill
    October 30, 2012 at 11:22 pm

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

  9. Isidoro Lopez
    October 30, 2012 at 10:18 pm

    Very Useful, The essential commands

  10. Knut H. Flottorp
    October 30, 2012 at 4:53 pm

    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.

  11. Ritwick Saikia
    October 30, 2012 at 3:12 pm

    "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.

  12. Tan Nguyen Nhat
    October 30, 2012 at 3:05 pm

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

  13. Gerhard Tinned
    October 30, 2012 at 10:17 am

    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.

  14. owais nauman
    October 30, 2012 at 7:04 am

    nice post.owais

  15. shruti
    October 29, 2012 at 6:21 pm

    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
      October 30, 2012 at 5:13 pm

      type df

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

      Use "umount " and then you can remove it.

  16. Nikhil Chandak
    October 29, 2012 at 12:54 pm

    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 ..

  17. MOo NEi Ra
    October 28, 2012 at 12:03 pm

    useful thanks ;)

  18. prateek pandey
    October 28, 2012 at 11:18 am

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

    • Knut H. Flottorp
      October 30, 2012 at 5:11 pm

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

      The same does not apply to MS Windows.

  19. Brian Mok
    October 27, 2012 at 10:29 pm

    Just what I was looking for. Thanks! :)

  20. Patrick Jackson
    October 27, 2012 at 1:07 pm

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

  21. Anonymous
    October 27, 2012 at 11:38 am

    A very small but usefull bite of linux commands

  22. raymond mcnatt
    October 27, 2012 at 6:57 am

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

    • Lisa Santika Onggrid
      October 27, 2012 at 12:26 pm

      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
        October 27, 2012 at 12:46 pm

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

        • Lisa Santika Onggrid
          October 27, 2012 at 1:00 pm

          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
          October 30, 2012 at 5:10 pm

          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
      October 27, 2012 at 12:46 pm

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

  23. Dmitriy Haralson
    October 27, 2012 at 6:28 am

    i knew 10, give or take

  24. RaMaN
    October 27, 2012 at 6:09 am

    Thanks for this article. Starred it.

    • bleu
      October 27, 2012 at 9:59 am

      Want cookies?

    • Joel Lee
      October 27, 2012 at 12:45 pm

      You're welcome. Glad you found it useful.

  25. md
    October 27, 2012 at 1:50 am

    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
      October 27, 2012 at 12:24 pm

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

      • Ohyran
        October 28, 2012 at 7:53 am

        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
          October 28, 2012 at 10:53 am

          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.

        • Ohyran
          October 28, 2012 at 12:09 pm

          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
          October 29, 2012 at 10:02 am

          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.

        • ozmark
          November 1, 2012 at 2:44 am

          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.

  26. Anandu B Ajith
    October 27, 2012 at 12:56 am

    Advanced Commands For Users Please

  27. Dotan Cohen
    October 27, 2012 at 12:47 am

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

    • Joel Lee
      October 27, 2012 at 12:45 pm

      Haha, I made a typo!

  28. Igor Rizvi?
    October 27, 2012 at 12:29 am

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

    • Knut H. Flottorp
      October 30, 2012 at 4:59 pm

      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..

      • dragonmouth
        January 29, 2013 at 8:56 pm

        "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.

        • Knut
          January 30, 2013 at 12:26 am

          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.

        • dragonmouth
          January 30, 2013 at 2:03 pm

          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.

        • Knut
          January 30, 2013 at 3:13 pm

          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.

  29. Harish Jonnalagadda
    October 26, 2012 at 11:34 pm


  30. Catherine McCrum
    October 26, 2012 at 10:34 pm
  31. Catherine McCrum
    October 26, 2012 at 10:34 pm

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

    • Anonymous
      October 27, 2012 at 2:05 am


      • Catherine McCrum
        October 27, 2012 at 3:15 am

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

      • Sazzad Hossain
        November 2, 2012 at 6:27 am

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

        • abi0tic
          November 16, 2012 at 2:18 am

          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
      October 29, 2012 at 6:20 pm

      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
        October 29, 2012 at 6:42 pm

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

  32. Efi Dreyshner
    October 26, 2012 at 10:21 pm

    man - the most important command :D

    • Knut H. Flottorp
      October 30, 2012 at 4:56 pm

      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
        October 30, 2012 at 5:02 pm

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

  33. Tarek Ramadan
    October 26, 2012 at 10:05 pm

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

  34. nolan quigley
    October 26, 2012 at 9:50 pm

    damn... the ascii didnt come out right...

  35. nolan quigley
    October 26, 2012 at 9:49 pm

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

    damn skippy!!!

    • William Hill
      October 30, 2012 at 11:22 pm

      HAHAHA!!! Greatness ;D

  36. Anonymous
    October 26, 2012 at 9:49 pm

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

    • Ihtisham ul haq haq
      November 3, 2012 at 1:34 am

      I think you might not,but don't think I am jealous of you...:D

  37. JJ
    October 26, 2012 at 9:47 pm

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

    • Besian Cato
      October 27, 2012 at 10:33 am

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

    • Joel Lee
      October 27, 2012 at 12:45 pm

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

    • Andrew
      February 23, 2015 at 10:42 pm

      "Linux 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."


      This is bullshit.

      Linux is hugely popular. Unix provides realiability where windows can't. Describing Linux as a third wheel is stupid and naive.
      What you on about boy ?

      Get your facts straight.

Leave a Reply

Your email address will not be published. Required fields are marked *