botbotbot 's blog

Debian frist boot

Make user can use Sudo command

$ su # aceess to root  
$ apt-get install sudo  
$ adduser <username> sudo  
$ reboot # or logout  


  1. How can I add a new user as sudoer using the command line?
  2. Sudo Configuration in Debian

Upgrade Debian to Unstable(Sid)

$ sudo vi /etc/apt/sources.list
# edit all 'squeeze' that's version codename 
# to 'sid' that's unstable codename
# ex. deb squeeze main 
# to deb sid main
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo reboot

Using Lastest Package on Debian (Testing Package)

$ sudo vim /etc/apt/sources.list
# add "deb testing         main"
$ sudo apt-get update
$ sudo apt-get install <your package>
# don't call sudo apt-get upgrade if your don't want to upgrade your all system to lastest packages

Check Version Debian

$ lsb_release -a #check debian version
$ uname -a #check linux version

How to switch between users on one terminal?

$ su - <user>

How To Find Fastest Mirror Lists With ‘Netselect-apt’ On Debian

# choose set your region to your local frist
$ sudo apt-get install netselect-apt
$ sudo netselect-apt

Debian Linux Install OpenSSH SSHD Server

# install
$ sudo apt-get update
$ sudo apt-get install openssh-server

# control ssh-server
$ sudo service ssh stop
$ sudo service ssh start
$ sudo service ssh restart
$ sudo service ssh status

Set Bash Color on SSH

# In your ssh server
$ echo "source your .bashrc" >> .bash_profile
# or you can try this [[ -f ~/.bashrc ]] && . ~/.bashrc

Extended monitor

$ xrandr --output VGA-1 --auto --primary --output DVI-I-1 --auto --left-of VGA-1

Install locals to support many languages

# debian
$ sudo apt-get install locales
$ sudo dpkg-reconfigure locales

Clean Uninstall

$ sudo apt-get remove --purge <packagename> # --purge delete all data and config
$ sudo apt-get autoremove --purge
$ sudo apt-get clean
$ locate <packagename> # manual delete

Show hidden file in GUI

Ctrl + H

keyboard shortcut for pasting on the Gnome Terminal

Ctrl+Shift+V - paste
Ctrl+Shift+C - copy

install and mount an exFAT partition

$ sudo apt-get install exfat-fuse exfat-utils