Archive

Archive for the ‘Tweaks’ Category

How to change the color of your BASH prompt

May 11th, 2017 No comments

How to change the color of your BASH prompt

You can change the color of your BASH prompt to green with this command:

export PS1=”\e[0;32m[\u@\h \W]\$ \e[m”

It will change the colour of bash temporarily. To make it permanent then add code in bash_profile page.

viĀ ~/.bash_profile

and paste above code save the file and you are done.

For other colors please see the attached list:

Color Code
Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Light Color Code
Light Black 1;30
Light Blue 1;34
Light Green 1;32
Light Cyan 1;36
Light Red 1;31
Light Purple 1;35
Light Brown 1;33
Light Blue 1;34
Light Green 1;32
Light Cyan 1;36
Light Red 1;31
Light Purple 1;35
Light Brown 1;33

Categories: Cloud Linux, CPanel / WHM, Tweaks Tags:

How to tweak linux server harddisk using hdparm

August 24th, 2013 No comments

Tune your hard disk for high performance Using hdparm

First of all you have to install hdparm in linux.

apt-get install hdparm

#hdparm /dev/sda

/dev/sda:
readonly = 0 (off)
readahead = 120 (on)
geometry = 8850/255/63, sectors = 142182912, start = 0

 

Hard disk Performance Information

# hdparm -tT /dev/hda

/dev/hdd:
Timing cached reads: 496 MB in 2.00 seconds = 247.42 MB/sec
Timing buffered disk reads: 60 MB in 3.03 seconds = 19.81 MB/sec

 

Hard drive set to low, slow settings

# hdparm -cuda /dev/hda

/dev/hda:
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
readahead = 256 (on)

Use below tweaks to increase disk read write performance.

For sda drive

~]# hdparm -a 2048 /dev/sda

/dev/sda:
setting fs readahead to 2048
readahead = 2048 (on)

For sdb drive

[[email protected] ~]# hdparm -a 2048 /dev/sdb

/dev/sdb:
setting fs readahead to 2048
readahead = 2048 (on)

 

]# echo “anticipatory” > /sys/block/sdb/queue/scheduler

]# echo “anticipatory” > /sys/block/sda/queue/scheduler

 

 

Categories: Tweaks, Uncategorized Tags: