Close

Handy Apostils – Linux

JAVA

Set JAVA_HOME

$> find /usr/lib/jvm/java*
$> # find the base directory in output, for instance /usr/lib/jvm/java-8-openjdk-amd64

$> export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

$> # OR to set it permanently
$> sudo nano /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH 

$> source /etc/profile

Select active JAVA version

~$ sudo update-alternatives --config java 

Localisation

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"

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close