Handy Apostils – Linux

Change keyboard layout per command line

~$ setxkbmap be

Bash History

Empty the history

cat /dev/null > ~/.bash_history && history -c && exit

Virtual Box

Install guest-additions

tasha@MENTAT:~$ 
tasha@MENTAT:~$ # Header installation required for the VB additions to compile
tasha@MENTAT:~$ sudo apt-get install linux-headers-$(uname -r)
tasha@MENTAT:~$ sudo apt-get install linux-headers-generic   # <- might not be required

tasha@MENTAT:~$ # After mounting the VB additions:
tasha@MENTAT:~$ cd /media/tasha/VBOXADDITIONS_5.0.10_104061
tasha@MENTAT:~$ sudo sh ./VBoxLinuxAdditions.run

tasha@MENTAT:~$ # In case of failure, here is the log file:
tasha@MENTAT:~$ cat /var/log/vboxadd-install.log

tasha@MENTAT:~$ # This is sometimes required to allow clipboard sharing to work. 
tasha@MENTAT:~$ # Has to be installed in addition to the VirtualBox additions.
tasha@MENTAT:~$ sudo apt-get install virtualbox-guest-dkms

tasha@MENTAT:~$ reboot

Software installation

apt-get behind an authenticating proxy


tasha@MENTAT:~$ # Either this:
tasha@MENTAT:~$ # ------------

tasha@MENTAT:~$ cd /etc/apt/apt.conf.d
tasha@MENTAT:/etc/apt/apt.conf.d$ nano 70debconf

// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
Acquire::https {
        Verify-Peer "false";
        Verify-Host "false";
        Proxy "https://username:password@ip:port";
}

Acquire::http::Proxy "http://username:password@ip:port";

tasha@MENTAT:~$ # Or this:
tasha@MENTAT:~$ # --------
tasha@MENTAT:~$ # (Warning: if typed at command line, this will land in the bash history)

tasha@MENTAT:~$ export http_proxy="http://username:password@ip:port"
tasha@MENTAT:~$ export https_proxy="https://username:password@ip:port"