I often find build instructions like this:

make install

while in reality I need to type

sudo make install

Why is this not mentioned in the installation instructions? Or is it supposed to be such common knowledge that it isn't worth mentioning? Or are you assumed to be logged in as root?

  • They may also show '$' or '#' before the commands to convey access level. – Devesh Khandelwal Jun 26 '15 at 17:20

They give you the correct commands, it is up to you as a user to ensure you have the correct privileges.

  • 2
    A lot of build instructions are very generic, they can build on many different platforms, some of which don't even have sudo. Sudo also isn't really a command related to the build, just a security measure. – prestomation Nov 22 '09 at 0:58

"sudo" may not be required if, for example, you have already run "su" and your session is running in elevated permissions. That negates the need to run sudo. Generally the use of sudo is preferred, but it is not strictly the only way to reach the same goal.

  • 4
    sudo also isn't always available/installed. – innaM Nov 20 '09 at 21:27
  • You should add that as an additional answer, @Manni, since comments don't earn rep. :) – JMD Nov 20 '09 at 21:31
  • You might also set --prefix to be $HOME/bin – Jeremy L Nov 20 '09 at 22:12
  • 3
    @nerdling: don't do that. set --prefix to $HOME. by default the bindirectory is $prefix/bin. you could set --bindir to $HOME/bin directly, but that won't change the installation directory for files destined for $prefix/share, $prefix/lib, $prefix/man, $prefix/sbin, etc. – quack quixote Nov 20 '09 at 23:29

You may not actually need root permissions to install a given software package, or you may not have access to root privileges via sudo or su or other methods.

One of the ./configure script's common options is --prefix, which changes the base installation directory from whatever the default is. So on a system where I have no root privs at all, I can still install this software to my own home directory:

./configure --prefix=$HOME
make install

The ./configure script has lots of other options, some common to all, some dependent on the particular package you're compiling. Use ./configure --help to see them all.

  • 2
    This answer, plus: it's not standard to make you use sudo for all your admin work. It's only some distributions (typically recent ones such as Ubuntu) that take this approach. – bobince Nov 21 '09 at 3:18

sudo is only available in certain distributions. In others, you must use su to switch to the root user, the run the command. They are NOT assuming you are already logged in as root, since you should never just be running things as root. They are assuming that you know enough about your system to know how to run something as root. It is quite common to need to run installations as root, so do be used to how to do it on your system.


Perhaps your instructors looked like this. I've seen the following many times:

$ ./configure
$ make
# make install

Notice the hash/pound sign. On almost every Linux distro I've used, this sign indicates you're in a root shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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