Practical Guide to Linux Commands, Editors, and Shell Programming, A (2nd Edition)This is an excellent book that I highly recommend for anyone who want's to learn/keep up with the latest and greatest Linux Commands, Editiors, and Shell Programming Knowledge! Such a great book it's actually worth buying if you are serious about learning Linux Commands, Editors, and Shell Programming! Highly Recommended! Also, here are some other great Linux books that I highly recommend purchasing while they're still in stock: |
Friday, July 29, 2011
Practical Guide to Linux Commands, Editors, and Shell Programming, A (2nd Edition)
Monday, April 18, 2011
Slim Down and Speed Up Linux
Slim Down and Speed Up Linux

While Linux is pretty efficient with a computer's resources out of the box, there are still ways you can make it run leaner and meaner on your desktop. Using a little bit of know-how, a willingness to run a few terminal commands, and a mind for efficiency, you can get every last bit of power from your Linux box, or get more life from an older system. Read on for a roundup of ways to slim down and speed up Linux that any level of user can implement.
One quick note: Many of these tweaks require altering system files, disabling processes or otherwise changing how your system runs. Whenever you alter a system file, back it up. The easiest way is to open a terminal and create a ".backup" version of it. For instance, to back up the /etc/hosts file, open a terminal and type:
sudo cp /etc/hosts /etc/hosts.backup
Prune your processes
The easiest and safest way to free up memory in any Linux system is to stop unnecessary programs and background processes from running, and then get your system to remember how you like it. Most Linux distributions have a tool in their "System" or "Administration" menus that let you see what's going on and halt things, if necessary—in Ubuntu, there are two of them: System->Preferences->Sessions, and System->Administration->Services.
On every computer I've loaded Linux onto, there are a few startup programs I almost always disable from the "Sessions" menu. I don't sync my phone to my computer and use Thunderbird instead of the built-in Evolution, so the Bluetooth Manager and Evolution Alarm Notifier are first to go. Before touching anything in the "Services" window, consult this ExtremeTech guide for pointers on what is and isn't safe to turn off. As mentioned in the guide, Ubuntu (like most distro GUIs) only sees a few of the many services your computer is running. If you really want to fine-tune your system, you can install the sysv-rc-conf package found in many distros and surgically remove unnecessary background programs—but I'll reiterate that point made above about backing up and making only a few changes at a time.Install Lighter, Faster Applications
Full-featured, well-rounded programs like Firefox, OpenOffice.org, and Amarok are a big part of the growth in Linux users. For computers running tight on memory, however, they can make Linux feel less like the streamlined system it's meant to be. For users who only need the basics, there are lighter-weight alternative applications that take up less memory and move a little swifter. - Office programs: AbiWord, Gnumeric, KOffice—OpenOffice, like its proprietary adversary, Microsoft Office, has more features, settings and tools than any one user is likely ever going to need. For those who just want to be able to type documents and make basic spreadsheet edits, AbiWord and Gnumeric are a nice compromise between speed and features. KOffice is a bit more full-featured and KDE-oriented, but seems to run faster than OpenOffice.
- File browsing: Thunar, PCMan—Both are fast, streamlined file browsers that don't try to offer up all the multimedia extras and graphical niceties that can bog down the default Nautilus (GNOME) and Konquerer (KDE) browsers. The PsychoCats site has a helpful guide for switching from Nautilus to Thunar; KDE users can also install Thunar or look into installing Dolphin from repositories, and any user can check out Google Docs, Zoho or other online office suites.
- Web browsing: Opera, Konquerer—There are extremely light browsers that use far less memory than Firefox (Dillo, Epiphany, and the like), but the convenience and ease of use are hardly comparable. Opera, however, offers a small memory savings, and KDE's built-in browser is extensible and noticeably lighter.
Remove extra virtual terminals
Virtual terminals are a good tool to have—they offer a last-ditch escape to command line for a chance to fix things in a crashing system. But many Linux systems come with six of them enabled, which isn't usually necessary. You can usually disable five of them with few consequences. If you're using Gutsy, open a terminal and type in the following commands:cd /etc/event.d... and so on, through the tty6 file. If you're still on Feisty or other Linux distros, you'll likely have to edit the file in /etc/inittab and add a # character in front of the lines ending with tty3, tty4 and the like.
sudo mv tty3 tty3.bak
sudo mv tty4 tty4.bak
Reduce swappiness
If your system generally has enough memory to handle what you throw at it, your use of swap space should be minimal, but your system doesn't know that. To temporarily lower your swappiness, type the following command into a terminal (replacing "sudo" with "su" in some systems): sudo sysctl -w vm.swappiness=10To make that fix permanent, enter the following command (trading "gedit" for "kate" in KDE systems, or "nano" or "vi" if you have neither):
sudo gedit /etc/sysctl.confIn the file that comes up, look for the line vm.swappiness=x and change the value to 10, or add the line if it doesn't exist.
Get good with the terminal
You've heard us evangelize about the efficiency of terminals before, but it's especially true in Linux. Give your terminal a handy keyboard shortcut, keep a list of basic commands handy, and learn to write bash scripts, create command shortcuts and find anything from one no-nonsense interface. Five more tips and guides to speeding up your system
- Speed up GNOME menu—A simple but noticeable tweak, especially on older computers.
- Speed up OpenOffice—Also applies to Windows and Mac versions.
- Speed up Ubuntu Boot and Shutdown Process—This guide applies mainly to Ubuntu 7.04, "Feisty Fawn," and earlier versions.
- Give Ubuntu a speed boost—Note that some of the tweaks in the linked article could, if done improperly, leave a system unbootable, so proceed with caution.
- Change GNOME Menus to Use PCMan File Manager—If you don't want to make a complete PCMan transition, this trick launches the browser from GNOME's top bar menu.
Kevin Purdy, Lifehacker's newest Associate Editor, digs finding optimization tips. His weekly feature will appear every Friday on Lifehacker.
Tuesday, March 17, 2009
openSUSE 11 Speed Tweaks
1. Disable Swap.
Swap is provide to anticipate lack of memory when using heavy application like graphical application. But sometime i using it.
To disable swap, in terminal konsole as root type /sbin/swapoff -a, anyway it can enable anytime with /sbin/swapon -a.
add on : Oct 17, 2008
Just found the effect when i swap off 256 MB RAM on my friend PC. It’s resulting Hang. I’m not recommend to disable swap if RAM size <=256MB
2. Inactivate Unnecessary Service
Open Yast | System | System Service (Runlevel) and click Expert Mode radio button. Disable service below by pressing STOP button then following with SET button to disable.
1. aaventd
2. boot.aapmor
3. atd
4. auditd
5. autofs
6. autoyast
7. fbset
8. gpm
9. joystick
10. mdadmd
11. portmap
12. nfs
13. nscd
14. ntp
15. openct
16. pcscd
17. postfix
18. powerd
19. powersaved
20. raw
21. rpasswdd
22. smbfs
23. spamd
24. xfs
25. xinetd
26. ypbind
3. Edit Innitab
At terminal konsole type vi /etc/inittab then push insert button on keyboard and give comment with # at following line :
1:2345:respawn:/sbin/mingetty –noclear tty1
2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
This will inactivate ty3~tty6
4. Modify sysconfig
open Yast | System | /etc/sysconfig Editor, click plus on SYSTEM then KERNEL tree and change
SCHED_MINTIMESLICE to 1000
SCHED_MAXTIMESLICE to 40000
next click File systems then mdadm, change MDADM_DELAY to 0.
5. Edit Service Manager
open K menu | Personal Settings | advance tab | Service Manager
Let below service running :
KDED Favicon Module
Konqueror preloader (if using Konqueror)
Kwallet Daemon Module
And disable others than above.
6. Inactivate Beagle
open Yast | Software | Software Management
search for beagle and tick to remove this application then click Accept Button.
openSUSE Tweak : Increase openSUSE Speed & Performance
openSUSE Tweak : Increase
openSUSE Speed & Performance
Image
credit to : masternewmedia.
Before you read this, please keep in mind that there were no
tweak
or tips which suitable for all condition and completely work for all
users. Tweak and tips will only be suitable depending your purposes,
requirement and environment. As an example, I may disable a service but
the same service must be keep enable on your side because I do not use
the service but you do.
This post is based on true
story :-). It’s my experience
and I’ve applied it. I get a faster and nicer openSUSE after applying
these tips. The success story may vary depending above reason and I’ll
be very pleasant for your advice or suggestion. Please share your experience by dropping a comment
if you decided to apply these tweak, partially or fully implementation.
- Disable Swap
If you have more than 512 MB of RAM (1 GB an example), it’s
may better to disable your swap space. Swap will only be used if
computer has not enough memory
for managing system task, but in certain condition, swap will be used
even on enough memory condition. Disabling swap will push the system to
fully managing memory allocation with RAM.
Disabling swap :
Enabling swap :
BEWARE : Please don’t try this if
you have less than 512 MB of RAM.
Even though Linux have a good memory management to manage memory
allocation, I do not suggest this tips because the computer may
suddenly hang if Linux has not enough memory.
There were also some suggestion on
installation tutorial to
prepare about 2.5X of RAM as good swap partition. IMHO, it may suitable
for an ancient history where 128 MB of RAM
is quite big. Now, RAM bigger than 4 or 8 GB is a common environment.
2.5X of 8 GB is 20 GB. Do you need 20 GB of swap for buffering daily
task ?
- Disable Unnecessary Services
It’s an important tips. Disable unnecessary service to increase
available memory. Go to YAST | SYSTEM | SYSTEM
SERVICES - RUNLEVEL to disable or enable any service.
You may also used chkconfig servicename off/on to
disable or enable services but I recommended YAST as primary choice
because YAST has complete information about what is service provided
for.
Choose Expert Mode to see
complete
information.What’s service should be disable ? As describe on prologue
above, it may vary depending your purposes but I try to keep it simple.
Below is a list of some service. Please adjust the service state with
your purposes and condition. If I skip the service, it means that I
leave it on default condition.
01.SuSEFirewall2_init
and setup : disable, unless you used firewall.
02.aaeventd
: If you have never used AppArmor, disable it. Disablingthisservice will also disable boot.apparmor
03.
04.acpid
: leave it
05.alsasound
: leave it
06.atd
: disable
07.auditd
: disable
08.autofs
: disable
09.autoyast
: disable
10.avahi-daemon
: disable (will also disable avahi-dnsconfd)
11.bluetooth
: disable, unless used bluetooth
12.bluetooth-coldplug
: disable, unless used bluetooth
13.
14.cron
: leave it, unless you have no scheduled cron job. I leave it enable on
my work PC but disablethis
on my home PC
15.
16.cups
: leave itif
you has attached printer or need
CUPS to print to another printer,ifnot
so, disable it.
17.dbus
: leave it
18.
19.earlykbd
: leave it, unless youdo
not need keyboard
20.earlyxdm
: leave it
21.earlysyslog
: leave it,for
logging
22.fbset
: disable
23.gpm
: disable
24.haldaemon
: leave it
25.idmapd
: disable
26.joystick
: disable, unless used itfor
games
27.kbd
: leave it,for
keyboard
28.lirc
: disable
29.mdadmd
: disable
30.named
: leave it,for
DNS Server daemon (I leave it
disable on my home PC but automatically change to enableifI
decided to install DNS Server)
31.mircocodectl
(Disablefor
AMD CPU, leave itforIntel
processor)
32.
33.network
: leave it, unless you have stand alone workstation anddonot
need to share files or used networking service
34.
35.nfs
: disable
36.nfsboot
: disable, depending
37.nfsserver
: disable
38.nmb
: disable, unless used itfor
Samba sharing file
39.nscd
: disable
40.ntp
: disable
41.openct
: disable
42.pscsd
: disable
43.portmap
: disable
44.postfix
: disable, unless used itfor
mail transport or mail server
45.powerd
: disable
46.powersaved
: disable, unless used suspend feature
47.random
: leave it
48.raw
: disable
49.rpasswdd
: disable
50.saslauthd
: disable
51.smb
: disable, unless used itfor
Samba sharing file
52.smbfs
: disable, according to smb state
53.smpppd
: disable, unless used itfor
dial up
54.spamd
: disable
55.splash
: leave it
56.splash_early
: leave it
57.sshd
: disable, unless used itfor
ssh access. sshd = ssh service
daemon.
58.syslog
: leave it
59.xdm
: leave it
60.xfs
: disable
61.xinetd
: leave it
- Edit Inittab
Edit /etc/inittab and disable (add # mark) tty3-tty6. It should like
this :
01.#
getty-programs for the normal runlevels
02.#
<id>:<runlevels>:<action>:<process>
03.#
The “id” field MUST be the same as the last
04.#
characters of the device (after “tty”).
05.1:2345:respawn:/sbin/mingetty
–noclear tty1
06.2:2345:respawn:/sbin/mingetty
tty2
07.#3:2345:respawn:/sbin/mingetty
tty3
08.#4:2345:respawn:/sbin/mingetty
tty4
09.#5:2345:respawn:/sbin/mingetty
tty5
10.#6:2345:respawn:/sbin/mingetty
tty6
- Change sysconfig setting
Change concurrent setting onYAST |
SYSTEM | /etc/sysconfig editor Choose positive sign (+)
on SYSTEM, KERNELChange
Make another change on SYSTEM, File System -> mdadm
Disable MDADM_SCAN and set “0″ for MDADM_DELAY
- Increase Partition Performance.
Modify /etc/fstab and add these setting :
1.for
Ext3 : natime, nodiratime, barrier
= 1
2.for
XFS : noatime, nodiratime
3.for
ReiserFS : notail, noatime,
nodiratime, barrier = flush
Please keep in mind that change the setting or partition
type will
make a deal with recovery capability of appropriate partition. It’s a
good idea to read this
and there
tutorial for a reference.
- Disable Beagle
Beagle used for desktop search.
It has such improvement on openSUSE 11.0 and 11.1 but if you didn’t
used it for daily usage, removing beagle will saved a memory that being
used for indexing. Remove it with YAST | Software | Software Management
or used our lovely zypper :
- Disable Nepomuk Desktop Search (on KDE 4)
If you use KDE 4, you may get a bonus by disabling
Nepomuk Desktop Search and Strigi desktop
Indexer
. Navigate to Kick
off Menu | Configure Desktop | Advanced | Desktop Search.
Disable (uncheck) Nepomuk Desktop Search and Strigi desktop
Indexer.
After applying these tips, launched Konqueror and navigate to
System Information (type sysinfo:/
on URL address and press enter. I used KDE 4.2 beta 2 with standard
menu while writing this post. You
may also get same result by go to kick off
menu | Computer | System Information).
See how much free memory available on your computer. After that, reboot
your computer, re-check the system information before and after
tweaking.
Reference :