CHAPTER 31 OPTIMIZING YOUR SYSTEM The one-size-fits-all (Web design)
CHAPTER 31 OPTIMIZING YOUR SYSTEM The one-size-fits-all approach of Ubuntu means that some services that are started up aren t always necessary. A good example is the Bluetooth service. This is started up on every single Ubuntu system, yet only a fraction of users will ever use it. Therefore, if you don t use Bluetooth hardware (and are certain you never will), you can safely disable it and retrieve the chunk of memory it uses, as well as the amount of time it takes to start during bootup. Approximately 60 run-level scripts start on a typical boot. By selective pruning, you can easily remove around a quarter or even a third of these, but caution is advised. You re altering a fundamental aspect of your system configuration, and one simple mistake can make the difference between a system that works and one that is no longer able to boot. Disabling Run-Level Scripts You can use the Services Settings program (System . Administration . Services) to control which run-level scripts start at bootup, but, sadly, it doesn t allow the enabling/disabling of initialization (run level S) scripts. It allows you to edit only certain numbered run-level scripts. Therefore, you need to download a command-line program called SysV Runlevel Config that can do the job. It offers a pseudo-graphical interface by which services can be activated and deactivated on all run levels, including S. To obtain the SysV Runlevel Config program, use the Synaptic Package Manager. (If you haven t already set up the Synaptic Package Manager to use online repositories, see Chapter 8.) Select System . Administration . Synaptic Package Manager, click Search, and search for sysv-rc-conf. Mark it for installation, and then click Apply. Open a GNOME Terminal window (Applications . Accessories . Terminal), and then maximize it to the full size of the screen. Then type the following to start the SysV Runlevel Config program: sudo sysv-rc-conf s 2S This command runs SysV Runlevel Config showing only run levels 2 and S, to remove potential confusion between run levels. The program s interface, shown in Figure 31-3, is simple. On the left, you see a list of the various scripts that are contained in the /etc/init.d directory and are therefore available for use during bootup (both initialization scripts and numbered run-level scripts). Not all of them are used. Those that aren t used are there in case they will be needed in future, or are provided for legacy reasons so that some software will work correctly. Along the top of the program window are the run levels you re going to edit: 2 and S. If the check box next to a service has an X in it, that script is run on that particular run level. You can change this by navigating to the check box with the cursor keys and pressing the spacebar. You can scroll through the list of services by moving the cursor down to the bottom of the screen, or by pressing Ctrl+N to scroll down a page. Ctrl+P will move you up a page.