Linux   « Proxy server - Client setup | HOME | NTP server »

 ■ Initial setup

Here is an initial setup in order to customize your work environment.

Alias
If you would like to setup a command alias, you can write it in ".bashrc". All users in this system have a separated file. So you can set this up separately according to users.

# nano .bashrc
alias ls='ls -hla --color=tty'
alias nano='nano -w' (no wrap)

(for example, if you take option ls, it is the same as ls -hla)

If you want to apply the setup to all users, write it in "/etc/bashrc".


Environment
To see environment, take option env.

If you want to setup env,
# export EDITOR=nano (for example, setup nano as default editor)

However if you have done only this, this setup is applied only this time. (After you logout, this setup is gone.) So write this in ".bash_profile" so that this setup is applied every time when you login to the system.


Above setup is applied when user login to the system. However if you would like to execute something even though user has not logged in to the system, write it in "/etc/rc.d/rc.local" which will be executed automatically after all start up processes were finished.

# nano /etc/rc.d/rc.local
mount /dev/sdb1 /mnt/hdd1 (example for external HDD)


Auto folder creation for new users
if you put the file in /etc/skel/ , these files are created automatically in the user directory when new user was created. For example,

# mkdir -p /etc/skel/ftp/html
# cp /etc/localtime /etc/skel/ftp

then, folder /ftp/html and file "localtime" will be created automatically in the user directory.


Root authority
Only specified user can be root with su.

# usermod -G wheel tomo
# nano /etc/pam.d/su

#auth required pam_wheel.so use_uid

auth required pam_wheel.so use_uid

投稿者 tomopugh : 2008年02月07日 13:54

Comment

Please comment !




Save the info?


  (Please don't click on "post" twice. It takes time a bit to change to the next screen!!)