Shells and Such

Shells and Such

Bash

The Bourne-again shell is generally the defacto shell for Linux distributions. It's stable, full featured, and very backwards compatible. Moving from the Korn shell to bash is as easy as falling in love (unless you're moving from the superior ksh93 to bash, in which case it's rather less comfortable). Moving backwards again isn't all that much harder. Automatic tab-completion of filenames is one of the nicer features. Learn to use bash. It's your friend.

Sudo

Ever try to execute a command but couldn't because you weren't root? Enter sudo. This nifty tool lets you execute commands as root or any other user . Of course, don't expect to get full rights to a system, because sudo has to be configured to allow you to execute those commands. System security is always an issue, and sudo can help.

SSH

You're at work and need to log into your Linux system at home, you Telnet to it, log in, and do whatever it is you needed to do. Later, after you get home, you find your system was hacked and all your files are gone. Some jerk was snooping the network and caught your Telnet login and was able to get your clear text password. Prevent this situation from ever happening by using SSH, the secure shell.

Pidof

pidof is a simple program that takes the name of a process and returns its PID number. If there is more than one process with the same name , it returns all of the PIDs of all of the so-named processes in a nice, simple list. This is a great time saver for killing processes, since you don't have to use something like

ps waux | grep inetd | cut -blah blah blah

Which

" Which ," I often ask myself , "file is being executed when I type 'ls'?" Simply typing 'which ls' will give you the full pathname to the program that will be executed. This can be used to troubleshoot problems with your PATH or just to find a specific binary.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net