bash
as your Linux shell. This is fine, but there are other shells available that are faster, smaller, and use less system resources.Everytime you login to your Linux system, open a terminal, execute a script, etc. you are opening up another Linux shell. Most of you Linux users are thinking it’s just a Linux shell, it doesn’t take up much resources, that’s true, but just think if you had 10 shells running. The system memory usage would increase a bit. Plus for those of you that don’t have faster computer hardware with tons of resources, we want to conserve as much RAM as possible.
So what can we do about all these Linux shells running eating up our system resources? We can install a lightweight shell and set it to be your default Linux shell. Let’s install
dash
which is a replacement of ash
(Almquist Shell) which was a BSD-licensed replacement for the Bourne Shell that was used in low resource systems.Depending on what Linux distro you are running, you may need to install
dash
slightly differently. First lets install dash
.- Gentoo:
emerge --sync && emerge dash
- Debain:
apt-get update && apt-get install dash
- Fedora:
yum install dash
dash
installed, we want to make dash
your default Linux shell. To do this first we want to open a terminal. Type su
, enter your root password, open your favorite text editor and edit /etc/passwd
. Any username you want to use the dash
shell, change /bin/bash
to /bin/dash
and save the file.Now we want to change the symlink of
/bin/sh
to point to /bin/dash
instead of /bin/bash
. To do this we must first delete the current symlink /bin/sh
. In your terminal, type rm -f /bin/sh
now we need to create a new symlink to /bin/dash
. To do this in your terminal type ln -s /bin/dash /bin/sh
and now you are done. Logout and log back in and all of your terminals and shells will be using dash
.NOTE:
dash
is a very lightweight Linux shell and does not have many features that bash
and some other Linux shells have. dash
does not support tab complete, so you can’t type cd /us(TAB)sr(TAB)lin(TAB)
and be taken to /usr/src/linux
. dash
does not support history either, so if you were just doing a bunch of long commands in a shell and didn’t want to retype them, just hit up a couple times and then hit enter, well you can’t with dash
, but you will notice your scripts running faster, terminals opening faster, less ram being used, etc.I hope this Linux speed tweak has helped you tweak your Linux computer to make it even more faster! For more Linux tutorials and speed tweaks continue reading through Beginner Linux Tutorial!
No comments:
Post a Comment