Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Just started with FreeBSD and I am not sure whether I need to be root to install programs or not? For example, the manual for installing X11 never says that we should issue su command.

However - it does not work without being a root, so my current solution is to add my account to wheel group, and do su whenever I do pkg_add -r or anything. Is this the "best practice" in unix?

The handbook does really talk about it in the user accounts section. Any tips appreciated.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

It says you have to run

# cd /usr/ports/x11/xorg
# make install clean

And in the preface, it says

Examples starting with # indicate a command that must be invoked as the superuser in FreeBSD. You can login as root to type the command, or login as your normal account and use su(1) to gain superuser privileges.

# dd if=kern.flp of=/dev/fd0

share|improve this answer
    
D'oh - missed that in the preface, thanks! –  drozzy Mar 24 '12 at 8:38
add comment

For the FreeBSD itself and installed programs, it doesn't matter how exactly you reach root permissions; the only needed thing is that you shall be root to modify most configs, install packages, etc.

OTOH there are general Unix recommendations to limit times when you have root permissions to minimal really required, especially when you aren't careful in checking environment on issuing command, when you work from shared workplace, etc. Run only separate commands using `sudo' (can be installed from ports), but limit time spent in root shell to special modes (e.g. total system upgrade).

share|improve this answer
add comment

Your Answer

 
discard

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.