Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-31-2007, 01:54 PM   #1
LQ Newbie
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
how do I run from root

I am new to linux, I ama using fedora 6. I can not create a new folder because I am not running as an administrator. I just downloaded this Os not to long ago, and I am currently running under a user name I created @localhost:
Old 01-31-2007, 02:07 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You do not need to be root to create a folder, unless you are trying to create it in a portion of the filesystem that does not belong to your userid. Not knowing that, you may want to read a few tutorials befor you use the root (administrator) account, as that can be very destructive to your system.

To answer your question, you can become root with the command:

su - root

You will be prompted for the root password, which your established during the installation process.
Old 01-31-2007, 02:13 PM   #3
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Try to do stuff as the regular user you created, only use root account when it's absolutely necessary. This usually prevents fatal accidents and possibly creates a bit more security, when root login is not open (should a security breach happen, it's not hopefully as fatal in a regular user account than with root privileges). Anyway, to become root temporiraly:

it asks for the root password (the one you entered during setup), and after that you're logged in as root (remember: this way, when you are acutally logged in as a regular user, the $PATH variable is not the same as root user's, so for some programs you need to specify full path, for example /sbin/fdisk instead of fdisk). A (hopefully) more secure, and one you should learn to use, is sudo. With sudo one can give limited (i.e. only certain commands, only for certain users) root privileges for a given user, and no root password need be revealed. For this you usually need to add the desired user into sudoers group (edit /etc/group file) and then add a line to /etc/sudoers that lets that user (or a group where the desired users belong to) use sudo command -- there you can also specify what commands that user can access with root privileges, and if (user's) password is needed (it should be). After these two things are set, you can then
sudo /sbin/fdisk
for example; this time the user's own password is asked, and after that the given command is run as root; after the command finishes, you are back to your regular account, so no root account is left 'open' if the command suddenly dies.

Note: when typing passwords, usually no letters are shown on screen. Everything is written though it's not displayed.
Old 02-01-2007, 08:13 AM   #4
LQ Newbie
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Still every time I try to creat a folder it still tells me that permition was denied.
When I first installed Fedora, I don't remember creating a password for root. I only created the one user. I was thinking about going back and download it again, may be this time I know what to look for.
Thanx, for the info.
Old 02-01-2007, 08:30 AM   #5
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
It would be easier to provide help if we knew the command you were using and the directory you were trying to do it in... i.e.

username@itg-debian:~$ pwd

username@itg-debian:~$ mkdir /test
mkdir: cannot create directory `/test': Permission denied
The above example does not work because we are trying to create the 'test' directory under the root file system .. had we issued the command mkdir test it would have worked because we would have then created /home/username/test instead of trying to create the directory /test as in the original example.

The first does not work because you are trying to create a directory in the root file system which a normal user does not have rights to, while in the second example the directory is being created in the users home directory.
Old 02-01-2007, 09:03 AM   #6
LQ Newbie
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Excellent, that is exactly what I was trying to I understand how it works.
Thanks a lot!
Old 02-01-2007, 09:18 AM   #7
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
There should be an award for newbies that have the patience to work things out and then actually say "thank you".....

Glad we could help---give us a harder one next time...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't run X as root! t-smurf Linux - Software 2 10-04-2005 01:49 PM
Run First As Root? Terje Linux - Software 1 01-10-2005 08:13 AM
I have to ssh -l root to run root processes!? paul.nel Red Hat 3 11-15-2004 11:55 AM
run as root squi Linux - Newbie 5 09-19-2003 09:31 AM
LimeWire installed as root, can't run if not root sulzla Linux - Newbie 1 07-01-2003 07:48 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration