
50
adduser user_name
Create a new account (you must be root). E.g., adduser barbara Don't forget to set up the
password for the new user in the next step. The user home directory is /home/user_name.
useradd user_name
The same as the command " adduser user_name ".
userdel user_name
Remove an account (you must be a root). The user's home directory and the undelivered mail
must be dealt with separately (manually because you have to decide what to do with the files).
groupadd group_name
Create a new group on your system. Non-essential but can be handy even on a home machine
with a small number of users.
passwd
Change the password on your current account. If you are root, you can change the password for
any user using: passwd user_name
chmod perm filename
(=change mode) Change the file access permission for the files you own (unless you are root in
which case you can change any file). You can make a file accessible in three modes: read (r),
write (w), execute (x) to three classes of users: owner (u), members of the same group as the
owner (g), others on the system (o). Check the current access permissions using:
ls -l filename
If the file is accessible to all users in all modes it will show:
rwxrwxrwx
The first triplet shows the file permission for the owner of the file, the second for his/her group,
the third for others. A "no" permission is shown as "-".
E.g., this command will add the permission to read the file "junk" to all (=user+group+others):
chmod a+r junk
This command will remove the permission to execute the file junk from others:
chmod o-x junk
Also try here for more info.
You can set the default file permissions for the news files that you create using the command
umask (see man umask).
chown new_ownername filename
chgrp new_groupname filename
Change the file owner and group. You should use these two commands after you copy a file for
use by somebody else.
su
(=substitute user id) Assume the superuser (=root) identity (you will be prompted for the
password). Type "exit" to return you to your previous login. Don't habitually work on your
machine as root. The root account is for administration and the su command is to ease your
access to the administration account when you require it. You can also use "su" to assume any
other user identity, e.g.
su barbara will make me "barbara" (password required unless I am a
superuser).
kernelcfg
(as root in X terminal). GUI to to add/remove kernel modules. You can do the same from the
command line using the command "
insmod", but "insmode" is less "newbie-friendly".
lsmod
List currently loaded kernel modules. A module is like a device driver--it provides operating
system kernel support for a particular piece of hardware or feature.
modprobe -l |more
List all the modules available for your kernel. The available modules are determined by how
your Linux kernel was compliled. Every possible module/feature can be compiled on linux as
Komentáře k této Příručce