Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to linux, and am taking a course that requires me to do the following:

  1. Creating a login name
  2. Establishing appropriate group(s)
  3. Creating the home directory
  4. Creating the login shell
  5. Establishing a pass word for the user
  6. Setting an appropriate PATH
  7. Placing appropriate files in the home directory

This is what I have done so far, but I'm not sure about my home directory and PATH...

[root@Server ~]# useradd -gusers -s/bin/shell -p1234 -d/home/group -m userid
[root@CentosStudentSvr ~]# usermod -m -d/homedir/ userid

What I should I do for my PATH?

share|improve this question
This is homework, isn't it? – Benjamin Bannier Jun 1 '13 at 17:32

I assume by 'PATH' you are referring to the environment variable $PATH.
If so, you would want to set and export in a configuration file.
This could be done in /etc/profile to affect all users, or in ~/.profile for an individual user.

You could add the following:

export PATH


  • $PATH preserves anything already set to the PATH.
  • : separates entries.
  • And the two directories are examples.

Note: this is a little bash biased, so It may be slightly different if you use another shell

share|improve this answer
He can also include ~/bin into the per-user config. That would comply with g) and is standard in some distros, too. – mpy Jun 1 '13 at 16:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.