Monday, September 18, 2017

Ubuntu Basics

In this article, I am going to write some basic Ubuntu operations which we need day to day. I am gonna describe everything as a list and this list goes on updated.

Font Installation

One of the frequently facing problem we get is the required fonts are not installed and we have to install by ourselves. Yes, there are several ways to install fonts in Ubuntu system. First of all, we have to know where the fonts are located and what is the purpose of the fonts.

First of all, we have to know about user defined fonts i.e. every every defines their fonts in their home directory:


The fonts in this directory are only for the specific user and not available globally.

If we have to make the fonts globally available, then we have to copy the fonts into other locations.The locations can be defined in


The default directories are

So, if we copy directly into the /usr/share/fonts or /usr/local/share/fonts to make the font available for all users. Of course, you have to be administrator to copy the fonts into the above-mentioned directories.

Here is the sample fonts to test. 

Sample Fonts

After copying into the corresponding directories, we have to run the following commands:

sudo fc-cache -fv

If system is rebooted, we do not need to execute above command, fonts are loaded automatically.

After installation is complete, we check if the fonts have been successfully installed.

sudo fc-list |grep verdana

If the font is successfully installed, then it show the newly installed font.

Note: we need to restart the application which are using the font to reflect the newly installed fonts.


This is one of the common problems I have faced. Basically, when using the German alphabets with umlauts, they are not properly displayed because of unicode related problems.

Here, I will try to explain as simple as possible to work around with that:

  • Check the current local settings:
      $ locale

  • See the available locales
      $ locale -a  

  • If locale is not in the list, then it should be generated(installed)
     $ locale-gen fr_FR.UTF-8

  • To regenarate locales, 
     $ locale-gen  
  • The default settings are stored in /etc/default/locale file. 
      We can directly change the contents of this file. Or we can use the command update-locale.
      $ update-locale LANG=de_DE.UTF-8

Note: the supported locales are located in the file /usr/share/i18n/SUPPORTED.

Shorcut Method:  

From terminal, run the following command, and select the required locales. That does everything we needed!

$ sudo dpkg-reconfigure locales

Yes, it is recommended to restart the system to properly load the locales.

Quickly Test USB Boot

  • Install qumu

            sudo apt install qemu

  • Test ISO
      qemu-system-x86_64 -cdrom filename.iso
  • Test USB
      qemu-system-x86_64 -hda /dev/sdx

Date Time Settings

This section describe how can we set date and time in Ubuntu system from command terminal. The auto update of date time is carried out through NTP server, the configuration of datetime sync server is a different topic. We simply set the date and time here.

First of all, there are two clocks: 1) System clock, 2) Hardware clock

Here, the date time set in hardware clock is what we see the time in Bios, and if Bios time is not correct, then the system time could be also incorrect because when system boots, it gets time from Hardware clock.

So, if hardware clock is wrong by any chance, the system time also gets wrong.

1) See system date and time
$ date
2) Set system date and time
$ sudo date -s '2017-10-04 16:31:32'
3) See hardware clock time
$ sudo hwclock
4) Set hardware clock time from system time
$sudo hwclock -w
5) Set system time from hardware clock time
$sudo hwclock -s

In the above commands, -w can be replaced with --systohc and -s can be replaced with --hctosys.

Enable Remote Desktop in Ubuntu Server  

If we install standalone Ubuntu server, and want it to be accessible via remote desktop, we have to do some extra task. Since, ubuntu-server comes without any desktop application, i.e. no GUI possible, only terminal. Thats cool if you are familiar with command line terminal. If you still want to make your server available via remote desktop, we have to install the desktop application in the server. The program we need for remote desktop is xrdp.

So, we install it using terminal as follows:

sudo apt update
sudo apt upgrade
sudo apt install xrdp
sudo apt install ubuntu-mate-core ubuntu-mate-desktop 
echo mate-session >~/.xsession
sudo service xrdp restart

Then we are ready to connect using rdesktop from Linux and remote desktop from windows based systems.

No comments:

Post a Comment