When you logon a Linux server, there must be couples of things that you have to do everyday, e.g. change to your project directory, check disk space, or check the server load. Of course you can create some shortcuts and alias
in your .bashrc
file, but you still need to manual execute your shortcut command and I am too lazy to even execute that command.
Well you can solve this problem by modifying your profile
file.
If you want to execute some scripts globally for all the users, you can then create a .sh
script under /etc/profile.d
folder, e.g. updating server proxy for all the users.
Note: the file has to be ended with .sh
suffix.
If you just want to do that for some specific user, you can then create a .profile
in /home/<user>/
directory, like
|
|
Then you have to modify your .bash_profile
file to apply your setting.
|
|
Note: Remember to source your .bash_profile
as well before logout your user. :P
Next time when you logon the user, you should see the difference!