1

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?

1 Answers1

1

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.

slhck
  • 235,242