Viewing apt-get stdout log

You can view the apt-get history like if you were in front of the terminal, by visualizing the log /var/log/apt/term.log:

~ $ cat /var/log/apt/term.log

The output would be something like:

Setting up php5-gd (5.6.24+dfsg-0+deb8u1) ...
php5_invoke: Enable module gd for fpm SAPI
php5_invoke: Enable module gd for apache2 SAPI
php5_invoke: Enable module gd for cli SAPI
Setting up php5-mysqlnd (5.6.24+dfsg-0+deb8u1) ...
php5_invoke: Enable module mysqlnd for fpm SAPI
php5_invoke: Enable module mysqlnd for apache2 SAPI
php5_invoke: Enable module mysqlnd for cli SAPI
php5_invoke: Enable module mysql for fpm SAPI
php5_invoke: Enable module mysql for apache2 SAPI
php5_invoke: Enable module mysql for cli SAPI
php5_invoke: Enable module mysqli for fpm SAPI
php5_invoke: Enable module mysqli for apache2 SAPI
php5_invoke: Enable module mysqli for cli SAPI
php5_invoke: Enable module pdo_mysql for fpm SAPI
php5_invoke: Enable module pdo_mysql for apache2 SAPI
php5_invoke: Enable module pdo_mysql for cli SAPI
Setting up php5-dev (5.6.24+dfsg-0+deb8u1) ...
Setting up php5-fpm (5.6.24+dfsg-0+deb8u1) ...

Configuration file '/etc/init.d/php5-fpm'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** php5-fpm (Y/I/N/O/D/Z) [default=N] ? 

Even in ncurses format:

apt-ncurses-screen

Unknown user in statoverride file

If you get this error in Debian/Ubuntu on apt-get install/upgrade etc:

dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown user 'user' in statoverride file

you can solve deleting ‘user’ in the statoverride file:

~ $ sed -i '/user/d' /var/lib/dpkg/statoverride

Now apt-get command should work fine.

Disable guest user in Ubuntu

Tested on Ubuntu 14 and 16

You can disable guest user in Ubuntu, editing this file:

/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

and appending this to the end:

allow-guest=false

Then restart system:

~ $ sudo reboot

Rename network interfaces in Ubuntu

Tested on Ubuntu 16

From Ubuntu 15, network interfaces names are generated by systemd/udev using predictable names based in several policies and schemes like firmware, BIOS, interface’s MAC address, geographical location and others. Names like enp2s0 for example.

However it’s possible change the name, if you want retro-compatibility with old software or for scripting, to do it add net.ifnames=0 to the /etc/default/grub file:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash net.ifnames=0"

Now make an update-grub:

~ $ sudo update-grub

And reboot:

~ $ sudo reboot

Interfaces now be called eth0, wlan0, eth1 etc…

Tuning ubuntu on Asus X series

It’s probably you’ll have to tuning several things in Ubuntu 15/16 if you are an owner of a laptop ASUS X series.

If yo get this error on syslog and/or by stderr (a lot of records by second):

printk messages dropped pcieport 0000:1c.5 Receiver Error
pcieport 0000:00:1c.5 PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00e5(Receiver ID)

add pci=nomsi to the /etc/default/grub file:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Also you’ll want control brightness via system keys, if don’t work, try adding acpi_osi=, acpi_backlight=native and intel_idle.max_cstate=1 to the /etc/default/grub file too:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi acpi_osi= acpi_backlight=native intel_idle.max_cstate=1"

Now make an update-grub:

~ $ sudo update-grub

At last, if you experiment disconnections on wireless mode check if your wlan driver is rtl8723be:

~ $ lspci | grep -i wireless
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter

If yes create a configuration file en /etc/modprobe.d:

~ $ sudo touch /etc/modprobe.d/rtl8723be.conf

And add this:

~ $ sudo echo 'options rtl8723be fwlps=0' > /etc/modprobe.d/rtl8723be.conf

Finally reboot:

~ $ sudo reboot