Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 have a weird problem, unfortuantely I don't know what I did to cause this, since I tried out lots of stuff on my Linux (Archlinux, 2.6.38 kernel). The problem is: My shell is not finding programs in /sbin anymore. It looks like this:

[chris@myhost ~] insmod
bash: insmod: command not found
[chris@myhost ~] ls -l /sbin/insmod
-rwxr-x-r-x root root 7888 Mar 23 10:14 /sbin/insmod
[chris@myhost ~] /sbin/insmod
-- Works

So as you can see, the program (the problem occurs for every executable in sbin) is still there, I can start it using /sbin/name, only the short name alias seems to be corrupted. How can I fix this?

share|improve this question
up vote 6 down vote accepted

This is not about aliases. It's controlled by the PATH environment variable.

On many systems, root has /sbin and /usr/sbin in PATH, but normal users don't.

If you want to type insmod etc without typing the full path, you can put


in your shell settings file (e.g. .bashrc in your home directory).

Or you could look at /etc/profile, /etc/environment, /etc/login.defs and see how it's setting PATH and change it there.

A quick way to find which file(s) to look in is running grep -R PATH /etc (or grep -HIRn PATH /etc).

share|improve this answer
That was easy, ty :) – user5767 Apr 6 '11 at 8:03

Your Answer


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