# Tab-completion for service script

**URL:** <https://forums.suse.com/t/tab-completion-for-service-script/24774>\
**Category:** SLES Configure-Administer\
**Created:** [November 19, 2013, 4:07pm UTC](https://forums.suse.com/t/tab-completion-for-service-script/24774 "2013-11-19T16:07:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![boblmartens](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@boblmartens](https://forums.suse.com/u/boblmartens)\
**Post date:** [November 19, 2013, 4:07pm UTC](https://forums.suse.com/t/tab-completion-for-service-script/24774/1 "2013-11-19T16:07:55Z")

</div>

When administering a GUI-less server installation and wanting to restart services I often use something like this to restart Apache:

```auto
service apache2 restart
```

That works, but I need to make sure that I type apache2 correct every time and … I don’t. I would love to have tab-completion for the service script but it seems that I don’t.

Any help would be greatly appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![jesse\_johnston](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jesse\_johnston](https://forums.suse.com/u/jesse_johnston)\
**Post date:** [November 19, 2013, 4:32pm UTC](https://forums.suse.com/t/tab-completion-for-service-script/24774/2 "2013-11-19T16:32:00Z")

</div>

Precede the command with ‘rc’  
Try:  
rcapa(TAB) status

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [November 19, 2013, 4:33pm UTC](https://forums.suse.com/t/tab-completion-for-service-script/24774/3 "2013-11-19T16:33:34Z")

</div>

Hi boblmartens,

[QUOTE=boblmartens;17544]When administering a GUI-less server installation and wanting to restart services I often use something like this to restart Apache:

```auto
service apache2 restart
```

That works, but I need to make sure that I type apache2 correct every time and … I don’t. I would love to have tab-completion for the service script but it seems that I don’t.

Any help would be greatly appreciated. Thanks![/QUOTE]

typically, those “services” are start scripts in /etc/init.d - and they ought to have a symlink to “rcsomething”. So as root, type “rcapa restart”, which ought to be expanded to “rcapache2 restart” and is the typical call to restart Apache’s httpd on SLES.

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![boblmartens](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@boblmartens](https://forums.suse.com/u/boblmartens)\
**Post date:** [November 21, 2013, 3:21pm UTC](https://forums.suse.com/t/tab-completion-for-service-script/24774/4 "2013-11-21T15:21:16Z")

</div>

[QUOTE=jmozdzen;17547]Hi boblmartens,

typically, those “services” are start scripts in /etc/init.d - and they ought to have a symlink to “rcsomething”. So as root, type “rcapa restart”, which ought to be expanded to “rcapache2 restart” and is the typical call to restart Apache’s httpd on SLES.

Regards,  
Jens[/QUOTE]

[QUOTE=jesse\_johnston;17546]Precede the command with ‘rc’  
Try:  
rcapa(TAB) status[/QUOTE]

Thanks to both of you for pointing that out. You both have just made my week!
