If your Ubuntu machine listens to NTP and synchronizes time with the Internet, the system will automatically adjust itself for the difference in time.
While your computer might not necessarily be aware of the fact that a leap second happened, it will catch and record the event as NTP servers push the change throughout the internet.
If you don't feel like the extra second is being added, you can force an update using the following command:
sudo ntpdate -s pool.ntp.org
This will automatically perform geo-location to give you a nearby server (reducing the latency error) and Ubuntu will adjust for your timezone (so if the server is in a different timezone, it's still all okay). Alternatively, you can use ntp.ubuntu.com
.
Note that if you're very unlucky, none of the time servers you're using will handle the leap second correctly. It's unlikely, but possible. Checking manually against a known good source (analogue radio, possibly time.is) is advised.
Alternatively, if you're on a modern version of Ubuntu, there's a built in utility called timedatectl
. By default, this runs once automatically on startup. Therefore, a quick reboot can force a sync if necessary.