Table of Contents
Minimal Debian Installation
Initialization
Upgrade packages
Modify apt-get sources file:
vi /etc/apt/sources.list
You can add your favorite sources there.
For some installations, we need to remove the CD-ROM as a source for apt-get.
Update apt-get and upgrade installed packages:
apt-get update && apt-get upgrade
For some installations which are missing dialog package we should install package dialog first.
apt-get update && apt-get install dialog
Remove redundant packages
apt-get -y purge apache2-* bind9-* xinetd samba-* nscd-* portmap sasl2-bin apt-get -y purge lynx memtester unixodbc python-* odbcinst-* tcpdump ttf-*
Do a clean:
apt-get autoremove && apt-get autoclean
Install some essential packages
apt-get install vim htop iftop psmisc sudo curl net-tools build-essential
Configurations
Change Time Zone
dpkg-reconfigure tzdata
Change default listening port for OpenSSH
Edit configuration file for OpenSSH:
vi /etc/ssh/sshd_config
Restart OpenSSH:
service ssh restart
Syntax highlight for VIM
Edit VIM configuration file:
vi /etc/vim/vimrc
Remove the “#” before “syntax on”.
Disable mouse mode in command line
vi ~/.vimrc
Add
if has("gui_running") set mouse=a else set mouse= endif
Make VIM as default editor
In some installations, the default editor is nano. We can replace that with VIM:
update-alternatives --config editor
Select “/usr/vim/vim.basic”.
Colorful ls
In order to get a colorful output from ls command, we can modify the configuration file in the home folder:
vi ~/.bashrc
Modify ~/.bashrc and remove starting “#“s before below lines:
export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA'
Custom Commands
vi ~/.bashrc
Modify ~/.bashrc and add below at the end of the file
alias lazydocker='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /opt/docker/lazydocker/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'
Optimizing
Replace OpenSSH with Dropbear
OpenSSH can be replaced by Dropbear to save memory.
