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