LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root question. (https://www.linuxquestions.org/questions/linux-newbie-8/root-question-270479/)

ratatat 12-26-2004 10:08 AM

root question.
 
hey guys,

sorry for the newbie question. i had linux for about 3 weeks and i love it but im still not fully understanding the root, user difference.
i understand that logging in as root you want to do administrative stuff but when i download programs they dont show up in my user acount and visa versa. am i not supposed to even mess with that stuff as root? what do i need to do as root? will updating drivers and stuff like that carryover to user? cause it doesnt seem to be doing so. if i download and update for a program or download a whole new program it is not there when ilog in a root.

thanks in advance :)

linmix 12-26-2004 10:36 AM

When you install programs as a user they normally get installed in your /home/<user> directory and are only available for you. If you install them as root it is possible to install aproogram to be available to all users.

When you download something as <user> and later want to install it as root, it is not available in your home directory because your <user> and root directory are differnt (in different places. Your <user> directory is at /home/<user> and root is at /root

ratatat 12-26-2004 10:39 AM

so just dont downlaod anything in as the root in the first place right?

linmix 12-26-2004 10:58 AM

That's a lot safer!! ... although, if you use APT or YUM you may need to be root in order to run the program and install updates...

ratatat 12-26-2004 11:14 AM

not sure what those two things are, heh

davidcousens 12-26-2004 12:40 PM

Certainly if you can download and install applications/packages as the regular user, then this is probably the best option, particularly if you are the only regular user of the machine (while running in Linux at any rate). When you have to do things as root, you might find it better not to actually log on as root - I find it better to remain as the regular user and su to root in a terminal (console) window. Any commands that you issue in this window will then be treated as coming from "root" with the greater read/write permissions associated with it. At the same time, you still have your own home folder (and thus your downloads)accessible. Also, any configuration files that are written during the installation process will tend to end up there, not in root's home folder - making the chances of the application being accessible as the regular user that much higher!

claudius753 12-26-2004 06:37 PM

I have almost never logged on to my system as root. I just log on as a user, and if I need to install anything i just do
Code:

su
Or, for instance, i want to modify a configuration file that only root has access to, such as the grub.conf i would do something like
Code:

su --command="gedit /boot/grub/grub.conf"
I prefer to do things using
Code:

su --command="blah blah blah"
when I only want to run one command as root so I don't forget I have root authority and screw something up.

linmix 12-27-2004 02:57 PM

I presume you mean APT and YUM when you ask about "those two things". They are quite brilliant tools to update your system. APT is the Advanced Package Tool and works (mainly) with .deb (Debian) packages and YUM is the RPM counterpart. Read up on it. It's definitely worth your while!


All times are GMT -5. The time now is 03:05 AM.