[arch-general] manage starting and stopping processes with less typing

David C. Rankin drankinatty at suddenlinkmail.com
Tue Apr 13 15:22:43 EDT 2010


	One thing I miss with Arch are init-script shortcuts for starting and stopping
processes. rc-commands really help cut down on typing. For example, all suse did
was to create links to the files in /etc/rc.d/... with a naming convention of
rc<init script name>. So, for example, instead of having to type:


the shortcut was simply


	I have normally seen the sym-link shortcuts placed in /usr/sbin, but
/usr/local/sbin works fine as well. The convenience is addictive. If you manage
your box from the command line or want to, then you can give this setup a
testdrive. You can create the sym-links very easily with the following cut and
pasted to the command line (as root - all on one line):

for i in $(ls /etc/rc.d); do [[ -e /etc/rc.d/$i ]] && [[ ! -h /usr/local/sbin/$i
]] && ln -sv /etc/rc.d/$i /usr/local/sbin/rc${i}; done

	You need to make sure /usr/local/sbin is in root's path to use the rc-commands
without having to type the full path each time (that would defeat any
convenience). You can quickly check to see if /usr/local/sbin is in root's path
by logging in, or su'ing, to the root account and pasting the next line into the
command line:

  set | grep \/usr\/local\/sbin

	If you get an answer, your fine, if you get nothing, then, as root, add
/usr/local/sbin to the path with:


	you can make the path permanent by adding to, or creating /root/.bashrc with
the following:

  export PATH=$PATH:/usr/local/sbin

	I know most of you know all this, but this was written with additional detail
to help those who may not make much use of the command line now, but may be
interested in learning more about the control it offers. Remember, you can do
some things some of the time from within various guis, but you can do ALL things
ALL OF THE TIME, from the command line.

David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339

More information about the arch-general mailing list