Basic Administration Commands #1

• printtool 
(as root in X-terminal) Configuration tool for your printer(s). Settings go to the file /etc/printcap. 

• setup 
(as root) Configure mouse, soundcard, keyboard, X-windows, system services. There are many distibution-specific configuration utilities, setup is the default on RedHat. Mandrake 7.0 offers very nice DrakConf . 

• linuxconfig 
(as root, either in text or graphical mode). You can access and change hundreds of setting from it. Very powerful--don't change too many things at the same time, and be careful with changing entries you don't understand. 

• xvidtune 
(in X-terminal). Adjust the settings of the graphical display for all resolutions so as to eliminate black bands, shift the display right/left/up/down, etc. (First use the knobs on your monitor to fit your text mode correctly on the screen.) To make the changes permanent, display the frequencies on the screen and transfer them to the setup file /etc/X11/XF86Config. 

• alias ls="ls --color=tty" 
Create an alias for the command "ls" to enhance its format with color. In this example, the alias is also called "ls" and the "color" option is only envoke when the output is done to a terminal (not to files). Put the alias into the file /etc/bashrc if you would like the alias to be always accessible to all users on the system. Type "alias" alone to see the list of aliases on your system. 

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

Linux Tips

See Also
Network Apps Commands

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.