Set all users' $HOME to /var/www and use system-wide aliases
If you just need them to start their sessions in /var/www
by default, you don't want to change their $HOME
(which is a bad idea anyway since /var/www
won't belong to them). A much cleaner approach is to add this to their ~/.profile
files:
cd /var/www
As for the aliases, all you need to do is modify their ~/.profile
files to source the alias file you've created. Add this line to each user's ~/.profile
:
. /path/to/.aliases
This way, they'll move to /var/www
each time they log in (since login shells load ~/.profile
) and they'll also have access to the aliases defined in /path/to/.aliases
.