The file
/etc/profile and your personal counterpart
~/.bash_profile are executed by a shell (e.g. bash) when it is started in login mode.
It is not essential for a working system, when you are a GUI-only type of user.
It's a plain shell script which sets up some environmental variables and settings, e.g. configuring the prompt you see in a terminal window (user@host:/$ _).
Just recreate it with a text editor.
Or copy it from ~/.bash_profile (if it's there)
Or copy an example profile from /usr/share/doc/bash/examples/startup-files/Bash_profile to /etc/profile
(dunno. assuming it is there on a Ubuntu-system)
Or use mine :-) (I have never altered it):
Code:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/sbin"
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
export PATH
umask 022
There is more than one way to do it.
cheers
fabian