• to move a le or directory to a new location or
• to do both in one step.
3 Coming to the conclusion that you do not need the le any longer, you can
delete it by entering
rm tuxfile.txt
Bash deletes the le without any conrmation.
4
Move up one level with cd .. and check with
ls -l test
if the test directory is empty now.
5
If yes, you can remove the test directory by entering
rmdir test
7.4 Becoming Root
As you learned inSection 6.1, “User Concept” (page 73), some tasks in Linux require
root permissions, otherwise they cannot be executed.
7.4.1 Using su
In order to temporarily become root in a shell, proceed as follows:
1
Enter su. You are prompted for the root password.
2
Enter the password. If you mistyped the root password, the shell displays a
message. In this case, you have to re-enter su before retyping the password.
If your password is correct, a hash symbol # appears at the end of the prompt,
signaling that you are acting as root now.
3 Execute your task. For example, transfer ownership of a le to a new user
which only root is allowed to do:
chown wilber kde_quick.xml
4
After having completed your tasks as root, switch back to your normal user
account. To do so, enter
exit
The hash symbol disappears and you are acting as “normal” user again.
Shell Basics 93