![]() ![]() ☞ Enter the first few letters of its name into a Spotlight search. ![]() Launch the Terminal application in any of the following ways: No matter what happens, you should be able to restore your system to the state it was in at the time of that backup. To really see everything, you have to run it as root.įirst, back up all data if you haven't already done so. ODS can't see the whole filesystem when you run it just by double-clicking it only sees files that you have permission to read. Running a shell command as root sudo (preferred when not running a graphical display) Put sudo in front of the command, and enter your password when prompted.Use su and enter the root password when prompted.Local snapshots ("Backups") are taking up only a small amount of space. This is the preferred method on most systems, including Ubuntu, Linux Mint, (arguably) Debian, and others. If you don't know a separate root password, use this method. Sudo requires that you type your own password. (The purpose is to limit the damage if you leave your keyboard unattended and unlocked, and also to ensure that you really wish to run that command and it wasn't e.g. a typo.) It is often configured to not ask again for a few minutes so you can run several sudo commands in succession. If you need to run several commands as root, prefix each of them with sudo. ![]() Sometimes, it is more convenient to run an interactive shell as root. The difference is that -i re initializes the environment to sane defaults, whereas -s uses your configuration files for better or for worse.įor more information, see the sudo website, or type man sudo on your system. Sudo is very configurable for example it can be configured to let a certain user only execute certain commands as root. Read the sudoers man page for more information use sudo visudo to edit the sudoers file. The su command exists on most unix-like systems. It lets you run a command as another user, provided you know that user's password. When run with no user specified, su will default to the root account. The command to run must be passed using the -c option. Note that you need quotes so that the command is not parsed by your shell, but passed intact to the root shell that su runs. To run multiple commands as root, it is more convenient to start an interactive shell. (The point is to limit the damage if the root password is accidentally leaked to someone.) Logging in as root On some systems, you need to be in group number 0 (called wheel) to use su. If there is a root password set and you are in possession of it, you can simply type root at the login prompt and enter the root password. Be very careful, and avoid running complex applications as root as they might do something you didn't intend. Logging in directly as root is mainly useful in emergency situations, such as disk failures or when you've locked yourself out of your account. ![]() Single user mode, or run-level 1, also gives you root privileges. This is intended primarily for emergency maintenance situations where booting into a multi-user run-level is not possible. You can boot into single user mode by passing single or emergency on the kernel command line. Note that booting into single-user mode is not the same as booting the system normally and logging in as root. Rather, the system will only start the services defined for run-level 1. Typically, this is the smallest number of services required to have a usable system. You can also get to single user mode by using the telinit command: telinit 1 however, this command requires you to already have gotten root privileges via some other method in order to run. On many systems booting into single user mode will give the user access to a root shell without prompting for a password. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |