Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to access my PC as root

su

and it doesn't says root@something it says

mypcname username # vi /something/

and in the normal terminal display says

username@mypcname ~ $

someone that knows what is happening? I need to gain access to a folder.

  • Linux mint 13 maya
  • cinnamon 64-bits
  • intel centrino inside
  • pc OS full mint with no partition
share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

As Claudius indicates, whoami will likely give you a different answer, and doing a login shell will also likely change things.

The "#" in the path indicates you are root. The username in the prompt comes from the $USER variable. Since you didn't su as a login shell, it did not replace the environment.

Take a look at http://en.wikipedia.org/wiki/Whoami

share|improve this answer
    
isn't it supposed to appear as root??? –  samurox Oct 11 '12 at 19:14
1  
Not necessarily. The username there really reflects what user set up the environment. So, if it shows "ashutko" I know that I have ashutko's path, ashutko's USER variable, and any other environment variables I have set up as ashutko. The $ in the prompt changes to a # to indicate you are root, but there are reasons you might want to select either environment to work in. If it says root, I know that it nuked my user's environment and initialized it based on root's profile. That's what happens when you du a su - . –  Alan Shutko Oct 11 '12 at 19:54
add comment

Try whoami to know who you actually are (legend has it Microsoft removed this command in one of their releases because they assumed users always remembered). The name in your prompt (and probably the largest part of the prompt itself) is inherited from your previous shell, as you did not start a new login shell (cf. Alan Shutko’s answer).

You might also want to try su - to get a full login shell and see if the prompt changes there.

share|improve this answer
1  
..and if su - doesn't work you can try su - root –  p_strand Oct 11 '12 at 18:46
    
it says that I'm root but still I'm unable to access a folder, it says access denied... –  samurox Oct 11 '12 at 19:17
    
Is this folder part of a FUSE filesystem mounted by a user? They sometimes have the nasty property of denying access to root. Furthermore, what is the output of id? Hopefully starting with uid=0(root)? –  Claudius Oct 11 '12 at 19:23
add comment

Try sudo su ? It works like this on my debian. Not sure about mint, but should work.

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.