Skip to content

Other Configurations

Vasco Craveiro Costa edited this page Nov 18, 2015 · 3 revisions

In order to increase the User-Machine interface quality, there are some "hacks" to be made:

  • To display system information on login, replace the ~/.profile content by:
# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

echo ""
echo -e '\E[33;40m'"\033[1mSystem Uptime Information and Who is logged in:\033[0m"
w # uptime information and who is logged in

#echo ""
#echo -e '\E[33;40m'"\033[1mDisk Usage:\033[0m"
#df -h -x tmpfs -x udev # disk usage, minus def and swap

echo ""

You can also remove the Message of The Day (that present information about Debian GNU license) by deleting the content of /etc/motd. Finally, you can add extra information on the local console by editing the content of /etc/issue file (this website contains more information about this).

  • To display colors on bash when using root user account, add the following lines to the bottom of /root/.bashrc:
force_color_prompt=yes
PS1='\[\e[0;31m\]\u@\h \[\e[m\]\e[1;34m\]\w\e[m\]\[\e[0;31m\] $ \[\e[m\]\[\e[0;37m\]'
  • Remove unwanted programs from startup using sudo sysv-rc-conf command (considering that you already installed the application)

  • You can enable CGroups by adding cgroup_enable=memory before elevator=deadline, in /boot/cmdline.txt file.

Reference