FreeBSD 11 Development Desktop on Dell XPS13
Utility Applications
The operating system is ready to go, but without applications its utility remains low. Start by installing some basic utilities to make the user setup and operating environment more pleasant.
MKSH - Shell
MKSH is a Korn Khell by MirBSD. It is small, fast and covers all the functions needed.
- pkg install mksh
Make mksh the default shell for new users by editing the default .profile file and adding a .mkshrc file to /usr/share/skel.
- vi /usr/share/skel/dot.profile
Change the file content as follows.
EDITOR=vi; export EDITOR # Changing PAGER to less from the default more for correct output from git. # Also less is more PAGER=less; export PAGER # Change default shell rc file to .mkshrc. ENV=$HOME/.mkshrc; export ENV
Create the .mkshrc file for shell setup.
- vi /usr/share/skel/dot.mkshrc
Add the following lines.
# file permissions: rwxr-xr-x # umask 022 # Enable the builtin emacs command line editor in sh set -o emacs # some useful aliases alias h='fc -l' alias j=jobs alias m=$PAGER alias ll='ls -lFohG' alias la='ls -laFohG' alias l='ls -lG' alias g='egrep -i' # set prompt: ``username@hostname:path $ '' with colours. PS1=$'\E[44;0;34m$(whoami)@$(hostname -s):\E[46;0;36m\$(pwd | sed "s,^\${HOME},~,") $\E[0m '
TMUX - Terminal Multiplexer
Tmux is a terminal multiplexer by the OpenBSD project, it allows you to run several virtual terminals from a single connection.
- pkg install tmux
SUDO - Priviledge Escalation
Sudo allows a user to run a command as a user with more priviledges, typically root.
- pkg install sudo
Configure sudo to allow members of the wheel group to run commands as root.
- visudo
Locate the following lines.
## Uncomment to allow members of group wheel to execute any command # %wheel ALL=(ALL)
Uncomment the second line so the text looks like the following.
## Uncomment to allow members of group wheel to execute any command %wheel ALL=(ALL)
GIT - Version Control
Git is a distributed versioning control system. It allows you to keep distributed repositories of accumulated changes to files.
- pkg install git
To configure a shared git repository called Development in /data/git.
- pw groupadd git
- mkdir -p /data/git
- chown root:git /data/git
- chmod 755 /data/git
- cd /data/git
- git init --bare --shared=group Development.git
To create a backup of the repository.
- git clone --mirror ssh://kristensen.info:/data/git/Development.git
To configure crontab to keep the mirror synchronized.
- crontab -e
Add the line.
* */1 * * * (cd /data/git/Development.git; git remote update)
Smartmontools - S.M.A.R.T Disk Monitor
Smartmontools is a S.M.A.R.T. hard drive monitoring daemon. Install it and use the default configuration example as the actual configuration.
- pkg install smartmontools
- mv /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf
- echo 'smartd_enable="YES"' >> /etc/rc.conf