Command Line Basics

From Sfvlug

Contents

Intro

While not as essential as it once was it is still very handy to know and use a few command line tools. Command line tools are entered at a terminal or virtual terminal and are the basic tools and utilities used when that was the primary method of interacting with a computer, in the dark days before eye candy was invented. It can come in real handy if for some reason your computer refuses to work properly. Even with modern graphical interfaces there is a good chance that at some point in time you may not be able to get into a graphical desktop or you may need to do something unusual where there aren't already any graphical tools available to do the job.


Starters

Newbie Command Line Essentials These are the very basic things that everyone using the command line should be familiar with. It is not essential for anyone to memorise all the ins and outs of these commands.

Extreme Basics

To make things even more essential if you know the following it is possible to find out the rest.


This command that gives you the manual that many folks intend you read when they tell you to Read The Fine Manual (RTFM) just type "man" followed by the name of the command for which you want to read the manual.

man command

This next command can be entered by itself or you can add the name of a file or directory of which you want a listing. There are two important switches for this command that influence the results.

ls lists the files and directories in the current working directory
ls -a displays hidden files
ls -l displays additional information about each file and directory such as size, date, owner

This next command will help you find possible commands based on keyword search.

apropos term

So, for example, if you wanted to find a command to change a password you could enter:

apropos password

and you would get a list of commands with the word "password" in their description.

Regular Expressions

Regular expressions are important to understand as a power user and as a programmer. A regular expression is used to make matches in data according to rules and then act on the data, also according to rules.

Here are some external links for additional information:
http://en.wikipedia.org/wiki/Regular_expression Wikipedia Article
http://docs.python.org/lib/module-re.html Python Regular Expressions

Your Ad Here
Personal tools

Parse error: syntax error, unexpected ':' in /home/editthis/www/editthis.info/extensions/custom_code/skins_MonoBook.php_after_toolbox.php on line 16