Article
It has been traditional within SUSE that service scripts are activated with a symbolic link usually in /usr/sbin. So that to start the sshd service you can issue the command rcsshd start as root from anywhere as the /usr/sbin directory is in the search path. Of course you also would be able to use the syntax /etc/init.d/sshd start , but this has always been a little long winded ;(
Moreover, these symlinks are not available in RedHat or CENTOS. They have the standard command: service . The problem with the command service is that you have to know the service name. You cannot use tab completion. So let's fix that!
complete -W "$(ls /etc/init.d/)" service
- complete : the command complete sets up tab completion
- -W : this option creates a word list for completion
- "$(ls /etc/init.d/)" : out word list is made up of the output of the command ls /etc/init.d/
- service : this then sets up the configured completion for the command service
Test and enjoy!
If you want this all the time add it to your ~/.bashrc
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 2188 reads


0