A few tips.
It's a good idea to add yourself in the /etc/sudoers file
Code:
# User privilege specification
root ALL=(ALL) ALL
shn ALL=(ALL) ALL
Once a user has been authenticated, a timestamp is updated and the user may then use sudo without a password for a short period of time (5 minutes by default).
You can install binary RPMS with sudo command as a local user. You can also run any binary programs that require root priveleges.
Just add the sudo command to it, like this:
sudo ./binary-executable
----------------------------------------------------------------------------------------------
If you have many terminals open using the $PS1 variable can help you keep track of them. It also might help you prevent making mistakes as root.
For example:
PS1="[\[\033[1;31m\]\u\[\033[0m\]@\h \W]\$ "
Add the above to your /root/.bashrc file. Every time you are logged in as root, the terminal will display "root" in red.
The actual color code is "1;31" inside the PS1 variable. The 1 says make it bold, and the 31 says the color (red). Other colors are:
1;30 Black
1;32 Green
1;33 Yellow
1;34 Blue
1;35 Magenta
1;36 Cyan
1;37 White#white
-------------------------------------------------------------------------------------------------
To change the default behaviour of Ctrl-Alt-Del, edit /etc/iniitab and look for ctrlaltdel
The last parameter is the command to execute when you press Ctrl-Alt-Del
For example, you can shutdown your machine with:
ca::ctrlaltdel:/sbin/shutdown -t3 -h now
-------------------------------------------------------------------------------------------------
Easy way to set a reminder for yourself, while working in the command line:
( sleep 10 && echo -e "Tea is ready\a" ) &
10 is a number of seconds to wait until the alarm, "-e" argument to echo forces it to see the "\a" sequence, which is an alarm bell.
Hope I did not miss anything, if so let me know
Bookmarks