Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: Howto: avoid having to reboot!

  1. #1
    Join Date
    Mar 2005
    Beans
    115

    Howto: avoid having to reboot!

    I'm starting this howto because a lot of people seem to be under the impression that you have to reboot Ubuntu to get certain changes applied. However, when working with Ubuntu, or Linux in general, it is important to remember that rebooting is a Windows CrazyThing (TM). The only thing you should really have to reboot a Linux machine for is for changes to the kernel. All other things you can reload/restart/whatever at run-time. This is due to the modular nature of the Linux system. Why do you think Unix systems have the highest uptime?

    Well anyway, lets get this started. I propose we make this kind of a collaborative effort since i'm by no means an expert (yet) and there's some stuff I don't know. So i'll just add what I do know and we can just add to each others knowledge, ok? Alright then.

    The graphical user interface
    As most of you know, you can refresh the gnome panel with the command:
    Code:
    killall gnome-panel
    However, when screwing around with your Xorg.conf, you have to restart X in order to apply your changes. You can do this with the key combination:
    Code:
     Ctrl+Alt+Backspace
    WARNING: This is a very powerful command! It won't ask you if you are sure, or if you would like to save anything you have running; it just shuts off everything in brute force. A more 'civilized' way might be to do '/etc/init.d/gdm restart', but i'm going to need confirmation on that.

    Services
    A default Ubuntu system has lots of services running. You can get a list of them with:
    Code:
    ls /etc/init.d
    For example, lets say you have a samba server running, and you made a change to the samba config file. You can restart samba like this:
    Code:
    sudo /etc/init.d/samba restart
    Or if a change has occurred in your network environment (new cable plugged in, interface removed, etc), you could do:
    Code:
    sudo /etc/init.d/networking restart
    And so on..

    This is all I can think of right now. I'm sure there's lots of other stuff, but in general just remember: rebooting in order to apply stuff is a Windows CrazyThing, and if you feel like you have to do it there is probably a better way.

    I encourage anyone to add to this Howto!

    Have fun!
    Last edited by Heliode; May 15th, 2005 at 11:00 PM.
    "Windows is something to overcome"

    Howto's by me:
    Tweak firefox! (URL now works..)
    Backup/Restore your system!
    Avoid having to reboot


    Compentux.org
    , the Linux Tip & Howto gathering initiative!

  2. #2
    Join Date
    Mar 2005
    Location
    export HOME=Lund, Sweden
    Beans
    128
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Hotwo: avoid having to reboot!

    Some quick notes:

    1. A lot of the init.d scripts also have a 'reload' action (e.g. "sudo /etc/init.d/samba reload") which just reloads the conf file. All of them doesn't work without restarting the program, but most do.

    2. "/etc/init.d/gdm restart" is correct (if you run kubuntu, exchange gdm with kdm). Although, a good thing to do is to press ctrl+alt+backspace after you've logged out. "/etc/init.d/gdm restart" is mostly used for reloading gdm's config.

    Anyway, it's a great howto. I would probably had written something like this if you hadn't
    Last edited by Firetech; May 16th, 2005 at 01:48 PM.
    Proud Ubuntu user, with Debian experience. (Ubuntu as main OS since March 2005)
    Registered Linux User: #386006 (Linux Counter)
    Registered Ubuntu User: #5184 (Ubuntu Counter)

  3. #3
    Join Date
    Feb 2005
    Location
    Geneva, Switzerland
    Beans
    976

  4. #4
    Join Date
    May 2005
    Location
    Jyväskylä, Finland
    Beans
    31
    Distro
    Kubuntu

    Re: HOWTO: avoid having to reboot!

    Also good trick to really get everything restarted without rebooting is going
    to the single user mode (init 1) and then back to the normal runlevel (init 2).

  5. #5
    Join Date
    Apr 2005
    Location
    El Salvador
    Beans
    80
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by _Pete_
    Also good trick to really get everything restarted without rebooting is going
    to the single user mode (init 1) and then back to the normal runlevel (init 2).
    Why Oh why I didnt think of THAT before ?!?!

    cool tip

  6. #6
    Join Date
    Mar 2005
    Beans
    115

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by _Pete_
    Also good trick to really get everything restarted without rebooting is going
    to the single user mode (init 1) and then back to the normal runlevel (init 2).
    That's also a good one! Not recommended if you are running a server people depend upon, but great for workstation users who don't like to wait for their system to reboot!
    "Windows is something to overcome"

    Howto's by me:
    Tweak firefox! (URL now works..)
    Backup/Restore your system!
    Avoid having to reboot


    Compentux.org
    , the Linux Tip & Howto gathering initiative!

  7. #7
    Join Date
    Nov 2004
    Location
    Ottawa, Canada
    Beans
    130
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: avoid having to reboot!

    There's one thing that I can't do without rebooting, so far: If I'm connected to the 'net at work, and I pack up my laptop and go home without turning it off, I can't get access to the 'net until I reboot. I've blown away my resolv.conf, did an /etc/init.d/____ restart on every system I could see that looked relevant, and I still can't. Oh well.

  8. #8
    Join Date
    Mar 2005
    Beans
    115

    Re: Hotwo: avoid having to reboot!

    did you try;

    sudo /etc/init.d/networking restart

    sudo ifdown eth0

    sudo ifup eth0

    sudo dhclient eth0 (if you're using DHCP)
    "Windows is something to overcome"

    Howto's by me:
    Tweak firefox! (URL now works..)
    Backup/Restore your system!
    Avoid having to reboot


    Compentux.org
    , the Linux Tip & Howto gathering initiative!

  9. #9
    Join Date
    May 2005
    Beans
    29

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by mr_ed
    There's one thing that I can't do without rebooting, so far: If I'm connected to the 'net at work, and I pack up my laptop and go home without turning it off, I can't get access to the 'net until I reboot. I've blown away my resolv.conf, did an /etc/init.d/____ restart on every system I could see that looked relevant, and I still can't. Oh well.

    sudo /sbin/service network restart <-- Does that do it?
    Registered Linux User # 375813
    Want to see something cool?

  10. #10
    Join Date
    Apr 2005
    Beans
    94

    Re: HOWTO: avoid having to reboot!

    Same things happens to me on my laptop.

    sudo modprobe -r ipw2200
    sudo modprobe ipw2200
    sudo dhclient eth1 (or whatever your interface is called)

    fixes it though.

Page 1 of 4 123 ... LastLast

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
  •