The prompt for the regular user ($)
changes to the superuser prompt (#). At this point, you have full permission to run any command
and use any file on the system. However, one thing that the su command doesn??™t do when used
this way is read in the root user??™s environment. As a result, you may type a command that you
know is available and get the message Command Not Found. To fix this problem, use the su
command with the dash (-) option instead, like this:
$ su -
Password: ******
#
You still need to type the password, but after that, everything that normally happens at login for
the root user happens after the su command is completed. Your current directory will be root??™s
home directory (probably /root), and things such as the root user??™s PATH variable will be used. If
you become the root user by just typing su, rather than su -, you won??™t change directories or the
environment of the current login session.
While becoming root is strongly discouraged with Ubuntu, you can do so if you must
with the command sudo -i -l root and giving the password.
You can also use the su command to become a user other than root. This is useful for troubleshooting
a problem that is being experienced by a particular user, but not by others on the computer
(such as an inability to print or send e-mail).
Pages:
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334