Valid XHTML Icon Valid CSS Icon Valid SVG Icon Unicode UTF-8 Icon
Add to del.icio.us Digg this! Post to reddit Share on Facebook Add to StumbleUpon Add to Google Bookmarks

Console Skills

Creative Commons LogoThis work is licensed under the Creative Commons Attribution Non-Commercial 2.0 UK: England & Wales Licence. This means that you are free to: copy; distribute; and modify this work. It also means that you cannot use it for commercial purposes. Additionally, you must attribute this work to the original author, Thomas Guymer, ideally with a link.

The console is a very powerful tool in any OS. This tutorial covers some of the very basic skills in using a console on Linux. A lot of people are afraid of using the console and think that it is difficult or that it will ruin their system - it really won't, it is very easy. Each aspect is accompanied with a video so that you may easily follow the steps. The two basic aspect which we are going to cover here are navigation and file editting.

Navigation

Perhaps the most essential tool with using the console is how to navigate to different folders on your computer. This provides a way for you to execute specific commands in certain areas on your computer. In the following video I type in a few basic commands, such as:

In addition to these basic commands I also press the TAB button. This is a very handy feature as it automatically completes the file's name for you. For instance, if you want to change into the sub-directory verycomplicatedname_v1.56.24 then it is a bit of a pain to type all that into the console with out a typo. So, all you need to do is type, say, cd ve and then press TAB and the computer will fill out the rest of the name for you. Look at around 28seconds and you'll see the command suddenly fill out, this is me pressing TAB.

One final thing to note before you watch the video is that I type cd ../ at one point in the video. We have already discussed that cd changes directory; ../ just means 'up one', i.e., return to parent folder or go back up one on the folder tree.

I hope you found the video to be very simple and that the skills which were shown weren't scary at all. Just open up a console on your computer and try them for yourself!

File Editting

Now we move onto a more practical example: file editting. In this series of examples we start to move forward, I use these new commands:

I hope you'll recognise some of the commands which were shown in the earlier examples. Once I have navigated to the folder I check that it is empty. I then create a text file called words.txt. Then I procede to open the file. Once it is open I press INSERT. This changes the editor into 'typing-mode' so that I can type hello. I then press ESC to get out of 'typing-mode' and save the file and quit it by typing :wq. I then list the contents of the folder so that you can see the filesize change from 0 Bytes to 6 Bytes. I then open the file again to read it and close it straight away by just typing :q. I then open it for a third time and add the word world to the file and save and close the file. I then conclude by deleting the file.

This is prehaps the most useful skill as this is very important when you want to change or edit config files on your computer. It is far easier and faster to just use vi in a console than fire up a GUI like KATE to do these little jobs.

I hope this brief tutorial has been helpful for you and shown you that there is nothing to be scared about in using the console. You might want to check out some common Linux Bash Commands if you want to try out some new things or a guide on using vi.

Last modified on 12/11/2009.

Amazon.co.uk logoDo you want to say thank you? Visit my Amazon Wishlist, thank you.Amazon dummy image

Random Photo:

(from My Portfolio)

© 2002-2010 Thomas Guymer. See the Copyright Statement & the Cookie Policy.