Posted: . At: 10:15 AM. This was 4 years ago. Post ID: 14138
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



Various useful tips for using Ubuntu.


How to check the installed Ubuntu version with the command line.

Use this command to check the installed version of the Ubuntu distribution.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

This is another method that works fine. This can print just the version.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ lsb_release -rc
Release:	18.04
Codename:	bionic

To print just the Ubuntu version number, use this command.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ lsb_release -r | cut -f 2
18.04

For installing a single deb package, use the dpkg command. This makes it easy to install a downloaded package manually.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ sudo dpkg -i net.downloadhelper.coapp-1.3.0-1_amd64.deb

How to check if your CPU supports 64-bit distributions. This command will show you if the CPU supports 32 and 64-bit operation.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ lscpu | grep mode
CPU op-mode(s):      32-bit, 64-bit

If you have bought an old computer with Ubuntu installed and you wish to see if it is 64-bit, run this simple command.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ getconf LONG_BIT
64

This will tell you if you are running a 64-bit or 32-bit operating system.

To login as root on Ubuntu, use the sudo su command.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ sudo su -
Your account has expired; please contact your system administrator
su: Authentication failure
(Ignored)
root@Yog-Sothoth:~#

This will give you a true root prompt using sudo. To unlock the root account, use the sudo passwd root command and type a password for the root account.

To install all pending updates for your Ubuntu system, this is how to do it.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ sudo apt update ; sudo apt upgrade

This will update all package repository data and then install any pending updates. Very simple command.

How to mount a drive in Ubuntu with the command line.

How to mount USB drives in Ubuntu without needing root access. This is very easy indeed.

https://securitronlinux.com/bejiitaswrath/how-to-mount-usb-drives-in-ubuntu-without-needing-root-access-this-is-very-easy-indeed/.

This command works perfectly. This only works with removable drives.

Here is an example. I am mounting a USB external drive.

4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ sudo pmount /dev/sda2

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.