Bash Profile

Bash profile consists of two files:
For some reason, all the entries in .bash_profile are commented out by default; not sure why.

When doing a useradd, a -m needs to be used in order to get these files copied to the users homedir. This switch will also create the homedir if it doesn’t exist. Seems like a good reason to add the following to root’s .bashrc:
alias useradd=’useradd -m’


  1. Hi Martin,

    With another year of learning since I wrote that, I would now suggest leaving useradd alone and not aliasing it. There is a another command ‘adduser’ that provides a front end to useradd and does all the Debian default stuff like creating the default config files.


Leave a comment