Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 15th, 2005   #1
Heliode
A Carafe of Ubuntu
 
Heliode's Avatar
 
Join Date: Mar 2005
Beans: 143
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!
__________________
"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!

Last edited by Heliode; May 15th, 2005 at 06:00 PM..
Heliode is offline   Reply With Quote
Old May 15th, 2005   #2
Firetech
A Carafe of Ubuntu
 
Firetech's Avatar
 
Join Date: Mar 2005
Location: export HOME=Lund, Sweden
Beans: 130
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
__________________
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)

Last edited by Firetech; May 16th, 2005 at 08:48 AM..
Firetech is offline   Reply With Quote
Old May 15th, 2005   #3
Sam
Grande Half-n-Half Cinnamon Ubuntu
 
Sam's Avatar
 
Join Date: Feb 2005
Location: Geneva, Switzerland
Beans: 992
Ubuntu 9.10 Karmic Koala
Send a message via ICQ to Sam
Re: Hotwo: avoid having to reboot!

Nice howto !
Sam is offline   Reply With Quote
Old May 17th, 2005   #4
_Pete_
5 Cups of Ubuntu
 
Join Date: May 2005
Location: Jyväskylä, Finland
Beans: 24
Xubuntu 9.04 Jaunty Jackalope
Send a message via MSN to _Pete_ Send a message via Skype™ to _Pete_
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).
_Pete_ is offline   Reply With Quote
Old May 18th, 2005   #5
Rodrigo
A Carafe of Ubuntu
 
Rodrigo's Avatar
 
Join Date: Apr 2005
Location: El Salvador
Beans: 87
Ubuntu Hoary 5.04
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
Rodrigo is offline   Reply With Quote
Old May 18th, 2005   #6
Heliode
A Carafe of Ubuntu
 
Heliode's Avatar
 
Join Date: Mar 2005
Beans: 143
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!
Heliode is offline   Reply With Quote
Old May 20th, 2005   #7
mr_ed
Gee! These Aren't Roasted!
 
Join Date: Nov 2004
Location: Ottawa, Canada
Beans: 130
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.
mr_ed is offline   Reply With Quote
Old May 20th, 2005   #8
Heliode
A Carafe of Ubuntu
 
Heliode's Avatar
 
Join Date: Mar 2005
Beans: 143
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!
Heliode is offline   Reply With Quote
Old May 20th, 2005   #9
testingubuntu
5 Cups of Ubuntu
 
Join Date: May 2005
Beans: 34
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?
testingubuntu is offline   Reply With Quote
Old June 7th, 2005   #10
epb613
A Carafe of Ubuntu
 
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.
epb613 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:59 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry