Find the answer to your Linux question:
Results 1 to 9 of 9
How do I login as root user? I need to run a command from the command line and it will only let me do it if I am the root ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    27

    How do I login as root user?


    How do I login as root user? I need to run a command from the command line and it will only let me do it if I am the root user.

    I know this is probably really simple but I new

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    You should never login as root user, it can be rather dangerous.

    Prefrably in a shell as user, type
    Code:
    su
    rootpassword
    and now you can do thiongs in CLI as root.

    What do you want to do as root?

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    27
    I am trying to install my ATi driver and I have to run a program called check.sh from the command line, but I can only do that as the root user. I am the only user on this PC so even if i totally bugger it up and I can just re-format and try again. Learning curve!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2005
    Posts
    27
    I know the root password already, I just need to login now. Is there a command for root user login?

    Thanks!

  6. #5
    Linux Guru
    Join Date
    Mar 2003
    Location
    Wisconsin
    Posts
    1,907
    To login as root, type su then the password at the prompt.

    Jeremy
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  7. #6
    Just Joined!
    Join Date
    Jan 2005
    Posts
    27
    Okay, I am logged in as root! Now how do I run a program called check.sh? It is for my ATi driver. Full name is /home/ben/check.sh


    Thanks

  8. #7
    Linux Guru Vergil83's Avatar
    Join Date
    Mar 2004
    Posts
    2,407
    Code:
    cd /home/ben/  
    ./check.sh

  9. #8
    Linux Enthusiast
    Join Date
    Jun 2004
    Location
    Windsor, CO
    Posts
    656
    To actually log in as root, just enter root as your username and enter the password. To switch to root from user, enter "su" and then enter the password.
    Emotions are the key to the soul.
    Registered Linux User #375050

  10. #9
    Banned
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    1,120
    Quote Originally Posted by Vergil83
    Code:
    cd /home/ben/  
    ./check.sh
    If this doesn't work, use:
    sh file_name.sh (the old way)

    If it still doesn't work, you'll need to change its permissions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •