How to find Ubuntu version and codename in a shell script

Question: I am writing a shell script where I need to obtain the release version and codename of Ubuntu system. How can I find Ubuntu version/codename inside a shell script? To find the version/codename of Ubuntu distribution from the command line, you can use lsb_release command which displays distribution-specific information. The following shell script snippet […]
Continue reading…

 

How to disable APT cache in Debian or Ubuntu

Question: I do not want to keep downloaded .deb package files after installing them with apt-get or aptitude. How can I disable APT cache to save disk space on my Linux? When you install a package with apt-get or aptitude on a Debian-based system, the downloaded package is, by default, kept in the APT cache […]
Continue reading…

 

How to remove MySQL on Ubuntu or Debian

Question: I have MySQL installed by apt-get on Ubuntu. What is a proper way to uninstall and remove MySQL on Ubuntu (or Debian, Linux Mint)? First of all, stop MySQL server if it’s running. $ sudo service mysql stop If you want to remove MySQL completely, use the following commands. This will uninstall MySQL server/client […]
Continue reading…

 

How to upgrade Firefox on Ubuntu

Question: I want to update default Firefox that comes installed on Ubuntu, to the latest version of Firefox. What is a proper way to upgrade Firefox on Ubuntu? Upgrading any pre-installed Ubuntu package such as firefox can easily be done via a GUI package manager called Synaptic. If Synaptic is not installed yet, install it […]
Continue reading…

 

How to disable a particular AppArmor profile on Ubuntu

Question: Is it possible to disable AppArmor for a specific service or software only, instead of completely turning off AppArmor system-wide? AppArmor, which is considered an alternative to SELinux, is the default application access control system of Ubuntu. Many Ubuntu packages (e.g., libvirt, MySQL) come with their corresponding AppArmor profiles which restrict the capabilities of […]
Continue reading…

 

How to install Adobe Reader on Ubuntu 13.10

Question: How can I install Adobe Reader on Ubuntu 13.10 (Saucy Salamander)? Adobe provides an executable full installer, as well as .deb and .rpm packages for Linux version of Adobe Reader. As of this writing, the “Canonical Partners” repository is not updated with Ubuntu 13.10, so you cannot install Adobe Reader from the Canonical Partner […]
Continue reading…

 

How to disable automatic updates on Ubuntu

Question: I noticed that some packages (even the Linux kernel) are automatically upgraded on Ubuntu. I do not want my system to be updated silently. How can I disable automatic updates on Ubuntu (server or desktop)? On Ubuntu, automatic updates are managed by a package called unattended-upgrades which is installed by default. This package downloads […]
Continue reading…

 

How to add a new context menu item in Nautilus file manager

Question: I want to create a separate context menu in Nautilus, which launches an external program against a selected file. How can I add a new context menu in Nautilus file manager? As a default file manager of the GNOME desktop, one of Nautilus’ notable features is its extensible interface, where users can add arbitrary […]
Continue reading…

 

How to install minimal Ubuntu desktop

Question: I want to use Ubuntu Desktop on my hardware, but without all the bloatware pre-installed (e.g., LibreOffice, media players, etc). How can I install a minimal Ubuntu desktop? If you want to set up a stripped down Ubuntu desktop, a clean approach is to first install Ubuntu server on your hardware, and then manually […]
Continue reading…

 

How to install Ubuntu One on Linux Mint

Question: I am a Linux Mint user. How can I install Ubuntu One on Linux Mint? Ubuntu One is a cloud service offered by Canonical Ltd. With Ubuntu One, you can store and sync files across multiple platforms including Linux, MacOS X, iOS, Windows and Android. Ubuntu One client comes pre-installed with Ubuntu Desktop. However, […]
Continue reading…

 

How to remove Amazon ads on Ubuntu

Question: I don’t want to see Amazon ads when I am searching on Ubuntu Dash. How can I disable Amazon ads on Ubuntu? Since Ubuntu 12.10 (Quantal Quetzal), Unity Dash started to show shopping suggestions from Amazon as well as online search results, which are tailored to your searches. This feature ticks off many Ubuntu […]
Continue reading…

 

How to remove PPA repository from command line on Ubuntu

Question: I added a third-party PPA repository on my Ubuntu box some time ago. How can I remove the PPA repository? Suppose you have a third-party PPA repository added on your Ubuntu system. $ sudo add-apt-repository ppa:webapps/preview If you want to delete a PPA repository alone, run the following command. $ sudo add-apt-repository --remove ppa:someppa/ppa […]
Continue reading…

 

How to remount filesystem as read-write in Ubuntu recovery mode

Question: I booted Ubuntu into recovery mode to fix a configuration file, but I noticed that the root filesystem is mounted as read-only. How can I remount a filesystem as “read-write” in Ubuntu recovery mode? When you enter a recovery mode in Ubuntu, the root filesystem gets mounted as “ready-only” by default, not allowing you […]
Continue reading…