Now that you have successfully installed Linux, there is some basic configuration required. Because of the number of different distributions available, it is sometimes easier to do this in command-line mode. To switch to a command line press CTRL-ALT- and any F key from F1 to F4. This will open a terminal with a login prompt. Type root as your user name, and when prompted enter the password you were asked for during installation.

The 'useradd', 'userdel' and 'passwd' Commands

At the moment, your system has just one login name: root. Root is the superuser on a Linux system. This means the root user can see-all and do-all with the system. This can be dangerous especially when you are not sure of something. The last thing you need to do is ruin your brand new Linux installation!

The first thing you need to do create a new user so that you can log in normally without causing any damage! To create a user from the command line type:

useradd username

username can be whatever you want. There are a couple of restrictions. You cannot use any of the non English language characters, such as /\* etc., nor can you use any spaces.

The next step is to create a password for the username. At the prompt type:

paswd username

where username is the name of the user that you have just created. You will now be prompted to enter a password. Remember a good password is one that contains a mixture of lowercase and uppercase letters and numbers. It should not be a dictionary word. Linux will in fact tell you if have chosen a bad password. You then have to confirm the new password.

You can check that the user has been properly created by pressing CTRL-ALT-F2 to open a new terminal and logging in as a new user.

Repeat the process to create as many users as you need. You can remove a user at any time by typing:

userdel username

Common Linux Commands

While most of your work will be done from within a GUI, there are times when you can do more from a command line. This is especially important if you damage an important system file and cannot get into the GUI. In these cases it is important that you have some knowledge of Linux commands.

The 'man' and 'info' Commands

If you need information on a specific command, from the prompt just type:

man command_name

The man command will display the manual for that command on the screen, with all the possible options, and an explanation of the commands functions. On newer Linux distributions this has been updated to

info command_name

which does the exact same thing.

The 'ls' Command

The 'ls' command is used to list the files in a directory. This command has a lot of different options. The most useful ones being:

Option Description
-l Shows all details about the file, including owner, permissions, dates modified, accessed etc.
-a Shows all files including hidden files. Hidden files are usually preceeded by a full stop (.).
-F Appends a / to directories, * to executable files etc.
-r Sorts the directory contents in reverse order.
--color="auto" Adds color to the output of the command. Makes finding files of different types easier.

There are many different options for the 'ls' command. Use the 'man' command to find them all.

The 'chmod' Command

Each and every file on your system is owned by someone. The owner is the person who creates the file. There will be times when you want to give, or restrict, access to the files you create. This is done using the chmod command. With this command you can change the permissions for the User, Group, and Others.

Permission Type Description Octal Value
Read Use this to allow the contents of the file to be viewed. 4
Write Use this to allow changes to be made to the file. 2
Execute Use this to allow the file to be executed. 1

The syntax of the chmod command is as follows:

chmod permissions filename

To work out the permissions on the file, all you need to do is add up the Octal values of the permissions you want to give each section. So for example, if you want to give

Section Permissions Required Octal Value
User Read, Write and Execute 4 + 2 + 1
Group Write and Execute 2 + 1
Others Execute 1

You would type chmod 741 filename

You can of course use any combination of these permissions that you want.

You can also change the permissions for a directory. If you change the permissions on a directory, you can restrict access to all the file in that directory.

Previous Top of Page Next

Hosted by www.Geocities.ws

1