Pick a Free OS

User login

Navigation

Linux Basics : First Steps Into Linux

his file permissions. The initial group

must be a group which already exists.


Password : This will be the user\'s password to access his account

login_name : This will be the user name with which the user will

access his account.

Eg :

useradd -d /home/einstein -e 2002-08-30 -g root -p relativitysucks

einstein

creates a user named einstein on my computer.

His home directory is /home/einstein

His expirty date is 30th august 2002

He belongs to the \'root\' group

His password is relativitysucks

His username is einstein.

Incase you do not enter one of the parameters group, home, expire

or shell they are replaced by their default values. These default values

can be viewed using the \" useradd -D\" command and can also

be changed which however we will cover in a later document.

The ls command

The ls command is equivalent of the DOS

dir command.

It lists the files and subdirectories contained

within the present directory.

Some possible flags which can be used with the ls command

are :

ls -a

List all files (Some configuration files starting

with a dot \'.\' are otherwise not listed). Often the number of files in a

directory is too large to be fitted within one screenfull of data.

In such a case we use dir/p for DOS. For linux a similar command is

ls | more

Lists files and directories page after page on

keystroke. The above command actually is a combination of two commands. It

introduces a new concept called \'Piping\'. It is done using the logical

OR or | character found just above the Enter key on your keyboard. In Linux

it is possible to give the output of one command to another command

as an input.The ls command lists files & subdirectories and the more

commands divides its input into page length views. Thus piping the

ls output to more results in page length views of files and subdirectories.

ls -R


It lists the files and subdirectories of a directory and further lists

the contents of each subdirectory recursively. The output of this

command is usually large and is best seen when piped through more.

The pwd command

The pwd or the present working directory command gives you the path to