If you\u2019re new to Linux or have simply never bothered to explore the command line, you may not understand why so many Linux enthusiasts get excited typing commands when they\u2019re sitting at a comfortable desktop with plenty of tools and apps available to them. In this post, we\u2019ll take a quick dive to explore the wonders of the command line and see if maybe we can get you hooked.\nFirst, to use the command line, you have to open up a command tool (also referred to as a \u201ccommand prompt\u201d). How to do this will depend on which version of Linux you\u2019re running. On RedHat, for example, you might see an Activities tab at the top of your screen which will open a list of options and a small window for entering a command (like \u201ccmd\u201d which will open the window for you). On Ubuntu and some others, you might see a small terminal icon along the left-hand side of your screen. On many systems, you can open a command window by pressing the Ctrl+Alt+t keys at the same time.\nYou will also find yourself on the command line if you log into a Linux system using a tool like PuTTY.\nOnce you get your command line window, you\u2019ll find yourself sitting at a prompt. It could be just a $ or something as elaborate as \u201cuser@system:~$\u201d but it means that the system is ready to run commands for you.\nOnce you get this far, it will be time to start entering commands. Below are some of the commands to try first, and here is a PDF of some particularly useful commands and a two-sided command cheatsheet suitable for printing out and laminating.\nCommand\t\tWhat it does\npwd\t\tshow me where I am in the file system (initially, this will be your\n \thome directory)\nls\t\tlist my files\nls -a\t\tlist even more of my files (including those that start with a period)\nls -al\t\tlist my files with lots of details (including dates, file sizes and\n \tpermissions)\nwho\t\tshow me who is logged in (don\u2019t be disappointed if it\u2019s only you)\ndate\t\tremind me what day today is (shows the time too)\nps\t\tlist my running processes (might just be your shell and the \u201cps\u201d\n\t\tcommand)\n\nOnce you\u2019ve gotten used to your Linux home from the command line point of view, you can begin to explore. Maybe you\u2019ll feel ready to wander around the file system with commands like these:\nCommand\t\tWhat it does\ncd \/tmp\t\tmove to another directory (in this case, \/tmp)\nls\t\tlist files in that location\ncd\t\tgo back home (with no arguments, cd always takes you back to your home\n\t\tdirectory)\ncat .bashrc\tdisplay the contents of a file (in this case, .bashrc)\nhistory\t\tshow your recent commands\necho hello\tsay \u201chello\u201d to yourself\ncal\t\tshow a calendar for the current month\n\nTo get a feeling for why more advanced Linux users like the command line so much, you will want to try some other features \u2013 like redirection and pipes. Redirection is when you take the output of a command and drop it into a file instead of displaying it on your screen. Pipes are when you take the output of one command and send it to another command that will manipulate it in some way. Here are commands to try:\nCommand\t\t\t\tWhat it does\necho \u201cecho hello\u201d > tryme\tcreate a new file and put the words \u201cecho hello\u201d into\n\t\t\t\tit\nchmod 700 tryme\t\t\tmake the new file executable\ntryme\t\t\t\trun the new file (it should run the command it\n\t\t\t\tcontains and display \u201chello\u201d)\nps aux\t\t\t\tshow all running processes\nps aux | grep $USER\t\tshow all running processes, but limit the output to\n\t\t\t\tlines containing your username\necho $USER\t\t\tdisplay your username using an environment variable\nwhoami\t\t\t\tdisplay your username with a command\nwho | wc -l\t\t\tcount how many users are currently logged in\n\nWrap-Up\nOnce you get used to the basic commands, you can explore other commands and try your hand at writing scripts. You might find that Linux is a lot more powerful and nice to use than you ever imagined.