Results 1 to 1 of 1

Thread: Service Command for Ubuntu

  1. #1
    Join Date
    Mar 2008
    Beans
    200
    Distro
    Ubuntu 10.04 Lucid Lynx

    Post Service Command for Ubuntu

    I've always wanted to have service command just like Fedora has for restarting, starting or stoping services. So I've finally figured out the way. What I do is add the following command in my .bash_aliases file, you can also just use .bashrc file instead.

    Code:
    # Service for Ubuntu
    function service() {
      sudo /etc/init.d/$1 $2;
    }
    Now just use it like this;

    service samba restart

    Original command is;

    sudo /etc/init.d/samba restart

    I hope this helps some one too
    Last edited by EMCGFX; October 27th, 2009 at 04:39 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •