Ubuntu 16.04 LTS for Human Beans

This page collects information to have Ubuntu 16.04 LTS (Xenial Xerus) in a laptop or desktop as usable as possible for Human Beans willing to use it for production.

1.1. Enable Ubuntu Partners

First enable "partners" repos, since we will use it later to install skype, at least.

Contents of the updated /etc/apt/sources.list
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb xenial partner
deb-src xenial partner

1.2. Extra repositories

Useful extra repositories. You can fire them all in a single go once you have the sudo password in memory (i.e. you have called some command with sudo recently. That's why this list of commands includes some dummy sudo ls first, so that you type your password if needed, and afterwards, you are not interrupted with the rest of commands that will be executed automagically one after the other if you ciopied the whole list of lines together and pasted them in a terminal window:

Command on a console
sudo ls
sudo add-apt-repository -y ppa:nilarimogard/webupd8
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:bit-team/stable
sudo add-apt-repository -y ppa:jtaylor/keepass
sudo add-apt-repository -y ppa:marutter/rrutter
sudo add-apt-repository -y ppa:shutter/ppa
sudo add-apt-repository -y ppa:tuxonice/ppa
sudo add-apt-repository -y ppa:atareao/telegram
sudo add-apt-repository -y ppa:maarten-baert/simplescreenrecorder
sudo add-apt-repository -y ppa:yg-jensge/shotwell
sudo add-apt-repository -y ppa:philip5/extra
sudo add-apt-repository -y ppa:mkusb/ppa
sudo add-apt-repository -y ppa:hamishmb/myppa
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable # Needed for R package tmap
sudo add-apt-repository -y ppa:opencpu/jq # Needed for R package tmap

# Add the release PGP keys for syncthing repo:
sudo curl -s | apt-key add -
# Add the "release" channel to your APT sources for updated-twice-per-month syncthing daemon:
sudo echo "deb syncthing release" | tee /etc/apt/sources.list.d/syncthing.list

Press enter each time when requested.

Nowadays, you can update your sources list, and install launchpad-getkeys:

sudo apt-get update; sudo apt-get install -y launchpad-getkeys; sudo launchpad-getkeys; sudo apt-get update

Launchpad-getkeys allows you to automatically import all the missing Launchpad GPG keys.

To use Launchpad Getkeys when you're behind a proxy:
sudo launchpad-getkeys -p

1.3. Install with interaction

Install programs which require interaction, like a confirmation step, a new password or user interaction of some sort.

  • mysql-server, for the webserver in localhost, etc.
  • phpmyadmin, to manage mysqldatabases easily through a web browser
  • apachetop, for monitoring apache in real time
  • ttf-mscorefonts-installer, required by other packages (PlayOnLinux, maybe?)
  • a few others like java, and network filesystem network packages

Command on a console
sudo apt-get install -y ttf-mscorefonts-installer nfs-common encfs libnss-winbind winbind cifs-utils oracle-java8-installer libdvd-pkg

If you need a webserver & php/mysql:

Command on a console
sudo apt-get install -y mysql-server phpmyadmin apachetop postfix

1.4. Install the rest in program sets

You can then install all the rest of the required and useful software for common tasks (including video editing, screencasting, etc). Note that the first package names until wcatalan are localization packages for our local language, and you can skip them or adapt for your language, etc.

Command on a console
sudo apt-get install -y apt-show-versions backintime-common backintime-gnome bluefish bluefish-plugins bum bzr-explorer cairo-dock cairo-dock-plug-ins cheese chromium-browser classicmenu-indicator corkscrew create-resources cups-pdf diodon filezilla firefox-locale-ca flashplugin-installer flvstreamer gdebi geany geany-plugins gimp-plugin-registry gir1.2-gst-plugins-bad-1.0 git git-core glabels gnome-alsamixer gnupg2 gparted grub2-splashimages grub-customizer gscan2pdf gstreamer0.10-plugins-good gstreamer1.0-fluendo-mp3 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gtk-recordmydesktop gufw guvcview gwenrename gwenview handbrake hibernate htop hyphen-ca icatalan icc-profiles-free indicator-cpufreq indicator-netspeed inkscape ispell kazam kde-l10n-ca kdenlive keepass2 keepass2-doc kile kipi-plugins krename krusader kupfer language-pack-ca language-pack-ca-base language-pack-gnome-ca language-pack-gnome-ca-base language-pack-kde-ca lftp libcurl4-gnutls-dev libdbd-mysql libgstreamer-plugins-base0.10-dev libgtk2.0-dev libmysqlclient-dev libreoffice-help-ca libreoffice-l10n-ca libsyntax-highlight-engine-kate-perl linux-firmware luckybackup mailutils mc meld mobile-atlas-creator mythes-ca nautilus-actions nautilus-columns nautilus-dropbox nautilus-scripts-manager oggvideotools ogmrip ogmtools openjdk-8-jre openshot openshot-doc openssh-server oxideqt-codecs p7zip p7zip-full p7zip-rar pavucontrol pdfchain pdfmod pdfsam pepperflashplugin-nonfree pidgin pidgin-indicator pidgin-plugin-pack pidgin-skype playonlinux powernap qemu-system qshutdown qtgstreamer-plugins-qt5 scribus scribus-doc scribus-template sendemail shutter simplescreenrecorder sshfs synaptic syncthing syncthing-gtk telegram telegram-purple terminator thunderbird thunderbird-locale-ca totem-plugins totem-plugins-extra transmageddon ubuntu-restricted-addons ubuntu-restricted-extras unetbootin unrar uswsusp variety virt-manager virtualbox virtualbox-dkms vlc vpx-tools wcatalan webp wine winetricks x2goclient xauth xfonts-100dpi xfonts-75dpi xfonts-base xsane xul-ext-lightning gcolor2 gedit-plugins kio-mtp shotwell testdisk geeqie pyrenamer kwalletmanager firefox libvdpau-va-gl1 soundconverter keychain mtp-tools mtpfs mkusb mkusb-nox usb-pack-efi ddrescue-gui torbrowser-launcher icedtea-8-plugin pdfposter posterazor  youtube-dl youtube-dlg

And if you need R and similar developer programs, you can install also:

Command on a console
sudo apt-get install -y  r-recommended  r-cran-xml libgraphviz-dev libcairo2-dev r-cran-cairodevice freeglut3 freeglut3-dev r-cran-rglpk r-cran-rgl r-cran-misc3d libx11-dev libxt-dev libcurl4-gnutls-dev libxml2-dev r-cran-xml libgraphviz-dev libcairo2-dev bwidget tk-table libv8-dev r-cran-rjava libmpfr-dev libc6 libssl-dev texlive-latex-extra texlive-lang-spanish libx11-dev libxml2-dev libxml2:i386 libxt-dev r-cran-misc3d subversion git texmaker tk-dev unaccent xvfb libgdal1-dev libproj-dev r-cran-rmysql libmagick++-dev r-cran-rcolorbrewer r-cran-doparallel libssh2-1-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev libjq-dev libprotobuf-dev protobuf-compiler libssl-dev libcairo2-dev

If you need webserver and other typical programs intended for servers, you can install this other set too:

Command on a console
sudo apt-get install -y  php-sqlite3 postfix rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus rapidsvn subversion php-memcache php-gettext php-intl php-mbstring php-pspell php-zip composer php-curl php-xmlrpc php-intl php-mcrypt php5.6-curl php5.6-xmlrpc php5.6-intl php5.6-mcrypt php7.1-mcrypt php7.1-curl php7.1-xmlrpc php7.1-intl php5.6-mysql php7.1-mysql poppler-utils php-memcached memcached

If you want to have locale packages such as Catalan, you might be intersted in installaing these extra packages:

Command on a console
sudo apt-get install -y  aspell-ca hunspell-ca

And for Spanish:

Command on a console
sudo apt-get install -y  aspell-es hyphen-es ispanish language-pack-gnome-es myspell-es mythes-es wspanish

Removed packages from the list compared to Ubuntu 14.04 by the time of this writing (April 23rd, 2016), and the corresponding replacement with somewhat equivalent featureset in 16.04

  • kdesvn -> rapidsvn | rabbitvcs (integrated in Nautilus)
  • jitsi -> installed by hand frmo their website, v 2.8.x
  • nautilus-open-terminal
  • totem-plugins-dvb-daemon
  • linux-firmware-nonfree
  • gstreamer1.0-plugins-bad-multiverse -> gstreamer1.0-plugins-bad
  • indicator-multiload

Other useful programs installed by hand in a later stage:

You can test email sending in the command line with:

echo testing | mail -s test_subject

1.4.1. Main changes noticed for human beans


  • Bluetooth works by default with most devices
  • Battery icon displays battery info for connectd bluetooth devices using batteries (mouse, keyboard, etc)
  • Icon to edit microphone volume levels shows up automatically on the top bar when the microphone is in use


  • "USB startup creator" doesn't let you choose a persistent partition file when creating bootable usb disks with ubuntu distros.

1.4.2. Extra R packages to be installed

Usual R packages that are useful in many cases. You can install them in an R console in a terminal (Type "R" in the terminal to launch the R console), or through RStudio command line.

Run in an R console
install.packages(c("devtools", "plotly", "Nozzle.R1", "VennDiagram", "stringr", "xml2", "parallel", "data.table", "doParallel", "xtable", "plyr", "dplyr", "reshape2", "rjson", "d3heatmap", "htmlwidgets", "googleVis", "doMC", "Rcmdr", "knitr", "checkpoint", "XLConnect", "sem", "rmarkdown", "relimp", "effects", "aplpack", "flexdashboards", "addinslist", "tidyverse", "magick", "webshot", "pacman", "officer", "flextable", "huxtable"))
library(devtools);if(!require(rCharts)) install_github('rCharts', 'ramnathv')

1.4.3. Install new php versions and switch between them

Ubuntu 16.04 comes with php 7.0, and some php applications might still fail with php 7.0 .Therefore, in some cases, it might be sensible to have both php 7.0 and php 5.x, so that you can choose which version to use for your needs at any time. Or even better, 7.1. You need to add a new repository to have other versions of php available, and you will require the equivalent branch for a patched apache2 that will work with the other php version repository.

You can do so with:

xavi@computer# sudo su
sudo add-apt-repository -y ppa:ondrej/php
sudo add-apt-repository -y ppa:ondrej/apache2
sudo apt-get update
sudo apt-get install php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6  php5.6-curl php5.6-gd php5.6-mcrypt php5.6-xml php5.6-xmlrpc libphp5.6-embed  php-memcache php5.6-intl php5.6-zip  php5.6-sqlite3  
sudo install php7.1 php7.1-mysql php-gettext php7.1-mbstring php-xdebug libapache2-mod-php7.1  php7.1-curl php7.1-gd php7.1-mcrypt php7.1-xml php-xml-parser php7.1-xmlrpc libphp7.1-embed  php-memcache php7.1-intl php7.1-zip  php7.1-sqlite3

Installing both php5.6 & php7.1 resulted in a lot of complaining from apt and lots of conflicts. The first suggested resolution was to remove all the stock php5 packages so that PHP 5.6 could be installed - so I just accepted the first suggestion.

The config files are all in /etc/php/5.6 and /etc/php/7.1 respectively - inside here is where you can configure which extensions are loaded, set the ini settings, and everything else for each version in isolation.

So to switch from php 5.6 to php 7.1 you need to do two things:

sudo a2dismod php5.6; sudo a2enmod php7.1; sudo service apache2 restart # For php in web apps
sudo ln -sfn /usr/bin/php7.1 /etc/alternatives/php # For php-cli in the command line
php -v
# PHP (cli) ( NTS )
# Copyright (c) 1997-2016 The PHP Group
# Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
#    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
#    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

or from php7.1 to php5.6:

sudo a2dismod php7.1 ; sudo a2enmod php5.6 ; sudo service apache2 restart # For php in web apps
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php # For php-cli in the command line
php -v
# PHP (cli) 
# Copyright (c) 1997-2016 The PHP Group
# Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
#    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

From the commandline, I have both php5.6 and php7.1 available as commands. I also still have a php command - look in /etc/alternatives to see that it symlinks to a particular version of PHP cli*. You can also quickly check which yours is using by running php -v.

Remember that php.ini and other files with settings are not in /etc/php5 anymore but in /etc/php/version/

1.5. PHP Debugger

You may use a nice (but closed source) IDE such as PHPStorm (which provides a version at no cost for FLOSS projects such as Tiki), or stick with pure FLOSS apps such as Aptana Studio IDE.


1.6. PHPStorm for FLOSS development

You can install as a Snap app, as indicated here:

Command in a terminal window
sudo snap install phpstorm --classic

1.7. Laptops

For laptops:

sudo apt install powertop tlp

For Macbook laptops:

sudo apt install gpomme wmpomme

For Battery saving - Suspend and Hibernate - Tuxonice Kernel

sudo apt-get install tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice

For hybrid graphic cards:
Intel + Nvidia:

Intel + ATI

1.7.1. Fixing battery drainage when switched off

Confirmed that problem still exists on a clean install from Ubuntu 13.04 up to 16.04 on a HP Pavillion dv6 i7. I installed the required program to fix the issue with:

sudo apt-get install ethtool

and we can check the "Wake on lan" current status with:

user@machine:~$ sudo ethtool eth0 | grep Wake-on
[sudo] password for user: 
	Supports Wake-on: pumbg
	Wake-on: g

If under the option ‘Wake-on:’ it says anything other than ‘d’ then it means this feature is enabled.

If it’s enabled then on most occasions it’ll say ‘g’ and you can use the below command to disable it.

sudo ethtool -s eth0 wol d

You may not have device eth0 but eno1 or similar (check using command ifconfig in the command line)

Then enter the previous command to who the status of ‘Wake-on:’ it should say ‘d’.

But the thing is, this setting will be lost as soon as you reboot your computer. So to make Ubuntu permanently save the changes, use the below steps.

gksudo gedit /etc/rc.local

Now simply copy and past the below code into that newly opened configuration file (make sure to paste it above the ‘exit 0’ code).

ethtool -s eth0 wol d

Replace eth0 for your own device name if it's different than this (in my case, it's eno1).

Since Ubuntu 12.04, you may to do something else. Let’s first copy the original script to the ‘/etc/pm …’ folder, as if we were to edit the file while keeping it on its original location, then it might get overwritten when your OS receives update. So for that, open the terminal window and enter the below command.

sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/power.d

Now enter the below command to edit it.

gksudo gedit /etc/pm/power.d/disable_wol

Once opened locate a code called ‘wol g’ (you can search for it in the editor) as shown below then simply change the letter ‘g’ to ‘d’.

Then click on the ‘Save’ button’ and close the editor. Now reboot your PC and when you’ve logged into the desktop use the command sudo ethtool eth0 | grep Wake-on to know if it’s working or not. If it’s working, then under ‘Wake-on’, now it should say ‘d’ (= disabled).

1.8. Ensure Syncthing uses latest daemon binary

Open syncthing-gtk UI, and update the syncthing daemon location to /usr/bin/syncthing if it doesn't get it from there by default, which will be v0.14.16 at the time of this writing xavier.depedro .

Click to expand
Click to expand

Then restart the daemon to get the new and updated binary from the right path, in case you had a previous version of the daemon elsewhere (by default syncthing-gtk downloads a not-so-up-to-date version for you from elsewhere in this path: /home/username/.local/bin/syncthing.x64)

Otherwise, syncthing-gtk would download an earlier version of the daemon (for instance, v0.14.9 as of the time of this writing xavier.depedro which is not compatible with the v0.14.14 of the daemon in the or Windows boxes at this time)

1.9. Fix hibernation

Trial 1

Taken from:

With the new systemd configuration, the Unity menu's "hibernate" option does not call on pm-hibernate. It instead uses the hibernate and sleep service of logind / systemd. I'm using a tuxonice kernel, and the tlp power management setup on a thinkpad w520, running Ubuntu 16.04 (devel). I think this article is still relevant even if you don't have tlp or tuxonice, since it's systemd that changes how suspend and hibernate work.

When this laptop suspends or hibernates, sometimes the wifi stops working when it wakes back up. The solution is to unload the wifi device driver module prior to sleep, and then reload it upon resume, the way the "hibernate" script does, and "pm-hibernate" also did.


Contents of the previous file
# Unload and reload the wifi modules over suspend / resume.

Description=WIFI modules unload/reload over suspend/resume

ExecStart=/sbin/modprobe -r iwldvm
ExecStop=/sbin/modprobe iwldvm


The other problem I had was that, using tuxonice, the user ui program was not visible during the hibernation process. I fixed this with:

sudo nano /etc/systemd/system/tuxonice-vtswitch.service

Contents of the previous file
# Switch vt for tuxonice UI

Description=Switch VT for tuxonice UI

ExecStart=/bin/chvt 63 ; /bin/sh -c "/bin/echo -ne '\033%@' > /dev/tty63"
ExecStop=/bin/chvt 7


Enable them with:

sudo systemctl enable wifi-modules-unload-reload.service
sudo systemctl enable tuxonice-vtswitch.service

This worked well in the macbookpro laptop from 2008.

Trial 2

If the previous trick doesn't work (like in a hp laptop with dual graphics card), try this other one:

sudo gedit /etc/default/grub



GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012'"

sudo update-grub
reboot twice!!

However, this didn't work for me. Hibernation or suspending fails in that computer with dual graphics card (ati + intel)

1.10. Re-enable hibernation from menus

First check if hibernation is compatible with your computer

You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.

Run this in a console

sudo pm-hibernate

Enter your password when prompted.

After you computer turns off, switch it back on. Did your open applications re-open?

If hibernate doesn't work, check if your swap partition is at least as large as your available RAM.

If the hibernate test works, you can continue to use the sudo pm-hibernate command when you want to hibernate.

You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Add the following to the file and save:

[Re-enable hibernate by default]

Alternatively, if the previous doesn't work for some reason, you can edit this file:

sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

Search for the sections related to "hibernate", and set ResultActive=no to ResultActive=yes

[Disable hibernate by default in upower]

[Disable hibernate by default in logind]

Re-enable hibernate in xfce panels

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla

Content to add:

[Re-enable hibernate by default]

1.11. Boot-repair (in multi-boot environments)

Thse instructions will save you some headache in a multi-boot environment when one OS changes the boot menu and doesn't allow you boot in your preFfered OS. You can boot from an Ubuntu live CS/DVD/USB, and install boot-repair program from its own repo, with:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

More information:

1.12. Add mate desktop


Command on a console
sudo add-apt-repository ppa:ubuntu-mate-dev/xenial-mate
sudo apt-get update
sudo apt-get install mate-core mate-desktop-environment mate-desktop-environment-extras mate-dock-applet

If you need to remove it for some reason and reverse the system to its previous state, do:

Command on a console
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntu-mate-dev/xenial-mate

Image Image

Just a test if it renders the image in PDF if it is out of the table:

1.13. Add Acrobat Reader 9.x

By default you can get Adobe Acrobat 8.x in the repositories, as far as I see. But you can download 9.x version in English from Adobe website:

For instance, this version: AdbeRdr9.5.5-1_i386linux_enu.deb

For 32-bit system:

sudo dpkg -i AdbeRdr9.5.5-1_i386linux_enu.deb; sudo apt-get -f install

For 64-bit system:

The easier way to install Adobe Reader DEB on 64 bit Ubuntu is using Gdebi, which will automatically install all dependencies.

sudo dpkg -i --force-architecture AdbeRdr9.5.5-1_i386linux_enu.deb; sudo apt-get -f install

1.14. Sign PDFs

You can Sign PDF documents with PortableSigner, a small Java app that does the job effectively: add the digital signature that can be recognized with Adobe Reader, and it can also place an extra page with a block of text (and you graphical signature as png/jpg in addition if desired) indicating that the document has been digitally signed by a method recognized by Adobe, and you can check the digital signature by means of opening in Adobe Reader the source pdf from that printed document.


1.15. Pair Bluetooth devices

Most devices work by default with standard procedures since the upgrade to Ubuntu 16.04 (they didn't in Ubuntu 14.04).

But Apple Bluetooth Keyboard seems to fail (since Ubuntu Jaunty in 2009, according to some posts elsewhere). I dream to find some valid workaround...

xavi@penguinbookpro:~$ hcitool scan
Scanning ...
	00:C0:DF:01:62:22	Targus Bluetooth Laser Mouse for Mac (AMB08)
	00:22:41:DD:36:4B	n/a

My solution was to buy a new bluetooth keyboard with backlight in the keys, for ~ 30€ in Amazon.
It works as is with default procedures. And the battery icon in the top bar of the desktop also displays the battery status of the bluetooth devices (nice!): mouse, keyboard, ... aside of the klaptop battery.

1.16. Tweaks to run Tiki Wiki CMS

Allow runing mod rewrite in Apache

1.16.1. Fix apache2.4 default settings to run Tiki

Edit /etc/apache2/sites-enabled/000-default

and change docroot from /var/www to /var/ww/tiki or your custom path, AllowOVerride from None to All, and ensure that the syntax to allow access to override .htaccess file is set with the syntax for Apache 2.4 ("Require all granted") and not with the former one for Apache2.2 ("Order allow,deny" and "Allow from all")

The file should be left as like:

root@coprinus:~# cat /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www/html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	<Directory /var/www/html/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
     	#Order allow,deny
        #Allow from all
        Require all granted

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


enable also the mod rewrite in Apache

commands in a console
sudo a2enmod rewrite
sudo service apache2 restart

1.16.2. Install elasticsearch 5.x from repos


Commands on a console:

wget -qO - | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
sudo apt-get update && sudo apt-get install elasticsearch

Ubuntu 16.04 uses systemd, as it can be queried with:

ps -p 1

Running Elasticsearch with systemd

To configure Elasticsearch to start automatically when the system boots up, run the following commands:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

Info provided in the console standard output:

Synchronizing state of elasticsearch.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/elasticsearch.service.

Elasticsearch can be started and stopped as follows:

sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service

These commands provide no feedback as to whether Elasticsearch was started successfully or not. Instead, this information will be written in the log files located in /var/log/elasticsearch/.

By default the Elasticsearch service doesn’t log information in the systemd journal. To enable journalctl logging, the --quiet option must be removed from the ExecStart command line in the elasticsearch.service file.

When systemd logging is enabled, the logging information are available using the journalctl commands:

To tail the journal:

sudo journalctl -f

To list journal entries for the elasticsearch service:

sudo journalctl --unit elasticsearch

To list journal entries for the elasticsearch service starting from a given time:

sudo journalctl --unit elasticsearch --since  "2016-10-30 18:17:16"

Check man journalctl or for more command line options. Install also kibana 5.x from repos


If you don't have that yet, see above to get the gpg-key, the apt-transport-https package and the repository url.

Commands on a console:

sudo apt-get install elasticsearch

Running Kibana with systemd

To configure Elasticsearch to start automatically when the system boots up, run the following commands:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service

Info provided in the console standard output:

Synchronizing state of kibana.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable kibana

Kibana can be started and stopped as follows:

sudo systemctl start kibana.service
sudo systemctl stop kibana.service

These commands provide no feedback as to whether Kibana was started successfully or not. Instead, this information will be written in the log files located in /var/log/kibana/.

1.17. Connect remotely using X2Go server

Coprinus usually gets local IP: from eth0 (and or anoher one from wlan when used instead)

Since Freenx doesn't seem to be easily installable in Ubuntu 14.04 servers (at least up to the time of this writing Xavi ). Therefore, we can use an open-source equivalent alternative, called x2go (x2goserver and x2goclient), which is maintained for GNU/Linux based servers, and with supported clients for GNU/Linux, Mac and Windows.

Quick howto to turn your machine into an X2Go server:

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession
sudo apt-get install x2gomatebindings  # if you use MATE/mubuntu
sudo apt-get install x2golxdebindings  # if you use LXDE/lubuntu

You also need to install some desktop environment which is supported by X2Go by default, and in our case, we will install one of the lightest desktops possible: LXDE (see for the full list)

sudo apt-get install -y lxde


  • Remember to install x2goclient in the client computer in order to connect to the server accordingly.
    sudo apt-get install x2goclient

1.18. Multiple USB Writing


1.18.1. Writing an ISO on multiple USBs

To write an ISO image file on multiple USB drives simultaneously, you will need the software that is named “MultiWriter”. Ubuntu users will find it in their default repositories with the package name “gnome-multi-writer”.

sudo apt install gnome-multi-writer

1.18.2. Writing multiple images on one USB

(a.k.a. "Multi-boot USB disk")
If you want to write multiple ISO images on one USB in order to have the capacity to boot into a selection of systems by using the same pen drive, you can do it with a tool called “MultiSystem”, or with another one called multiboot.

Using multisystem

Add the corresponding repository by entering the following commands on the terminal:

sudo add-apt-repository 'deb all main'
sudo launchpad-getkeys
sudo apt update
sudo apt install multisystem

Open the application and select the device from the list below. Note that the device must be mounted at “/media” and its filesystem must be “FAT32” in order for multisystem to detect it properly.


Watch out that it reports that it will write grub boot loader in the Master Boot Record (of the usb? or the main hard disk of your computer??? )

MultiSystem started


On the first tab of the application’s menu, you may add your image files one by one. Just hit the green arrow button and a file manager window will let you navigate your local files.

Add image file in MultySystem

Next, you may select the “Menus” tab which is basically a Grub configurator. It will allow you to set up the grub.cfg configuration file set the colors and background image of the bootloader and compile the menu list.

Grub Configurator

Other options include the use of non-free components like the PLoP boot manager and the FiraDisk. Moreover, in the “Boot” tab, you may select system-specific boot options, or just test-drive your creation in the QEMU system virtualization tool, or in VirtualBox. This of course, presupposes the existence of either in your system.

Other Bootmanagers

If MultiSystem isn’t working for you, you may also try alternatives like the multibootusb or the YUMI that basically do the same thing. In general, I have found that all of these tools are a little bit underdeveloped and often riddled with bugs, so you should have patience and not give up easily. Having a multisystem USB stick is worth your time and effort.

Using multibootusb



The recommended filesystem is FAT32, so make sure to format your USB drive before creating a multi-boot USB stick.

You can select the persistence size by dragging the slider under MultiBootUSB tab. Persistence gives you an option to save changes to the USB drive in runtime. (in theory; will it work since Ubuntu 16.04 doesn't seem to use it by default?)

Next time I boot through the USB, I get the option of choosing either of the distributions.

1.19. Create Linux Live USB disks

You can add an extra repository to include mkusb dus (Do USB Stuff), which will allow you to create boot usb disks with persistence of changes in a reliable way for recent Ubuntu distros such as 16.04 LTS and newer. In such distros the default traditional methods such as USB Disk Creator or UnetBootIn no longer work in all cases as they did with earlier Ubuntu versions.

Derived from:

sudo add-apt-repository ppa:mkusb/ppa  # and press Enter
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi

And system for a tweaked version of LXLE 16.04.2 (32 bits; 1-disk-fits-all-computers approach):

1.20. GNU ddrescue-gui repo

sudo add-apt-repository ppa:hamishmb/myppa
sudo apt-get update
sudo apt-get install ddrescue-gui


1.21. Tested on

PC Laptop Coprinus

"Coprinus" is the name of a laptop computer, with a somewhat blackish screencorner, and silverish cover. somewhat similar to the Coprinus generus of mushrooms.
Image Image

HP Pavilion dv6. i7 (4 real processors, & 4 virtual). 8Gb RAM. 1Tb Hard Drive. 2GB double gaphics card (ATI & internal).
Keyboard: foreign, 104 keys.

Computer bought at "Outlet PC" . Keyboard stickers bought on ebay for 4€ approx.

OS: Dual Boot

  1. Ubuntu 16.04 GNU/Linux 64 bits.
  2. Windows 7 Home

(dual boot from grub)

AMD hybrid Graphics card
Note for AMD hybrid graphics users: you can use fglrx-pxpress and AMD Indicator which are basically the equivalents of the tweaks elsewhere for AMD. See the Ubuntu wiki for more info.

Macbookpro Laptop Penguinbookpro

Ubuntu 16.04 LTS + MacOSX 1.5 + Win XP Pro, on a MacBookPro 5.5 laptop. A.k.a.: "Penguinbookpro"

Macbookpro Add iSight webcam driver

Taken from:

Install some basic tool to handle the Driver (don't worry about the path to the driver, sinc eyou'll provide the driver itself in a later step).
Run this command in a terminal:

sudo apt-get install isight-firmware-tools

Skip the prompt to immediately load the driver file.

cd ~
# Download AppleUSBVideoSupport driver file (e.g. and place it at your home folder ~
sudo cp AppleUSBVideoSupport /lib/firmware/
sudo ift-extract -a /lib/firmware/AppleUSBVideoSupport
sudo nano /etc/default/acpi-support

Find MODULES and make it MODULES="isight_usb".

lsusb | grep -Po '(?<=:)(\d+)(?=.*iSight)'

This outputs the product ID of your specific iSight USB device. Remember this number. Mine is 8507. The default Ubuntu driver seems to be hardcoded for 8300, which is a problem.

sudo nano /etc/udev/rules.d/isight.rules

Add (and be sure to replace the "8507" with your product ID.):

ACTION=="add", SYSFS{idVendor}=="05ac", SYSFS{idProduct}=="8507", RUN+="/usr/lib/udev/ift-load --firmware /lib/firmware/isight.fw"

Shutdown/poweroff (not reboot or restart).

Boot again the computer.

If you don't have Cheese yet, install it. Launch cheese program to test the webcam.

sudo apt-get install cheese; cheese

By this time, your webcam should be working nicely. :-)

1.22. Optional - Linkat 16.04 standard or lightweight

Tweak your install with Linkat apps (adapted for Catalonian Educational contexts):

This distribution has:

  • its own ubuntu repository,
  • a set of applications for the learning of kids and teenagers, organized based on age periods.
  • specific apps to help freezing desktops, user profiles, etc.
  • a minimal version of the distribution, based on Lubuntu (LXDE)
  • instructions to install mswindows-like desktop styles to make new users more comfortable with the look and feel of their usual desktop environments they are migrating from.
  • apply skeletons of the desktop environment to pre-existing users in the system

Alias names for this page:

16.04 | 1604 | Ubuntu16 | Ubuntu 16 | Ubuntu1604 | php

Image Llavor: nom \ˈllavor\ : el principi d'alguna cosa que continua desenvolupant-se o creixent

Llavors de coneixement

Canvia l'Idioma