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 just obtained a new openSUSE 12.1 VPS from Windows Azure trial. I already have experience with that OS (from 11.0 with subsequent upgrades) and immediately noticed two things:

  • l command is missing
  • doing ls -l doesn't colour files according to their type (green text: executable, blue: directory, red: writable)

I would like if I can someway configure the new VPS to colour my console when I type ls -l or possibly enable the l shortcut.

Also, I found that while on my usual openSUSE machines I can become root by issuing su, here I must issue either sudo su or sudo -s. Why that? Can I change it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you want ls to have colors, then you need to alias it. Add this to your ~/.bash_profile:

alias ls='ls --color=auto'

If the l command is missing, add one yourself. If all you want is a long listing, then this should be about it:

alias l='ls -l'

The difference between su and sudo su is that the former would ask you for the password of the target user – root in that case – while the latter will ask you for your password and then change to the target user. This is for security purposes, so you don't have to know the root password. Or, the root password isn't even set, in which case su alone wouldn't work.

I'm not too sure about OpenSUSE and whether it requires you to set a root password at all — others please feel free to correct me —, but in either case you might want to stay with sudo su.

See here for a little more info.

share|improve this answer
    
When I install openSUSE on my own I'm always required for a root password after I set up my user account. The other openSUSE VPS I have explicitly sets root password on creation (I can login only like that the first time), instead Azure doesn't ask me for root password but only for mine. So that's correct –  djechelon Jul 12 '12 at 21:05

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.