User:Przemoc/Notes

From Alpine Linux
Revision as of 20:37, 15 April 2016 by Przemoc (talk | contribs) (AL 3.3.3: Disk/smartd)

I finally installed AL and I'm poking it a bit. Here you can find some notes regarding this experience. They should be helpful, but please use them with caution. I may add some additional commentary sometimes. If you think there is a better way to perform some of mentioned here tasks, then don't hesitate to notify me about it. Top-level headings denotes AL version that was used. Backward and forward compatibility is possible, but not tested.

Alpine Linux 3.3.3

Shell

Even though I always try to write POSIX sh-compliant scripts, I like to have bash as my default shell, because it's quite handy. Being able to write for instance quick diff -u <(COMMAND1) <(COMMAND2) (to compare output of two commands) or mv FILE{,SUFFIX} (to rename file by adding suffix) is very convenient.

Bash as default shell

AL doesn't have vipw, so root has to perform vi /etc/passwd himself to change the last field of root record (should be the first line in the file). You have to install util-linux package to get chsh utility.

Activate color prompt

Initial prompt: baytrail:~#

mv /etc/profile.d/color_prompt{,.sh}

Prompt after above change and relogin: baytrail [~]#

Long history

I like to have long history, so I created following file:

/etc/profile.d/long_history.sh

export HISTSIZE=9999999
export HISTFILESIZE=$HISTSIZE

Disk

Install smartctl and smartd

# install package
apk add smartmontools

# comment DEVICESCAN and uncomment DEVICESCAN -R 194 -R 231 -I 9
# to get meaningful and useful raw temperature in syslog
vi /etc/smartd.conf

# add smartd service to autostart
rc-update add smartd

# start the service now
/etc/init.d/smartd start