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

As you can see in the screenshot, the shortcut doesn't work, but the full path does. How can I fix it?

Enter image description here

I am logged-in as a normal user then su to root, since direct root is disabled BTW.

share|improve this question
up vote 2 down vote accepted

There are several ways to achieve what you want. I think you want the first of these.

Su -

When you su to root, specify that you want root's environment by adding "-" to the command.

su -

Root's path includes /usr/local/sbin on many Linux distributions.


If you add /usr/local/sbin to your PATH environment variable, then you can use the short form of the name. You can do this

export PATH=$PATH:/usr/local/sbin

The syntax depends on what shell you are using (the above should work for bash). If you want this to be a permanent change, add this command to your .bashrc or equivalent file in your home directory. Do not change root's .bashrc


Alternatively, create an alias.

alias maldet=/usr/local/sbin/maldet
share|improve this answer
I was using plain su the whole time, su - worked. Thanks. – IMB Aug 11 '12 at 9:22

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.