On my system the PS1 is overwritten again by the bashrc-script in the home folder,
in ~/.bashrc
. Try adding it to this file. By the way, the order in which those and other init files are evaluated is described in the man page in the sections FILES
and INVOCATION
.
Edit: you can debug the startup process of bash to check whether my diagnosis is correct by running bash -x
.
To solve it being shown to all users, you can only edit the per-user config in the skeleton dir /etc/skel/.bashrc
, then your changes to PS1
will be available to newly created users. This will not affect already created users, which have the PS1-overwriting .bashrc
. For those you have to edit (or perhaps ask those users to edit) the per-user configs in ~user/.bashrc.
, adding your change or deleting the PS1-overwriting command.
.bashrc
which setsPS1
by default. See/etc/skel/.bashrc
for an example.