Data Fidelity

Jewel and Pearl: A Practical Tutorial to Command Lines and Terminal on Ubuntu Noble

This tutorial will give you simple but complete practical exercises to learn Terminal command lines of Ubuntu 24.04 “Noble Numbat” enough for daily computing life and as a starting point to learn further. We entitled this tutorial Jewel and Pearl to make it easier to you to remember (please try to spell it!) and to match with current Ubuntu theme that is crown and jewellery. We wish you the best.

 

Subscribe to UbuntuBuzz Telegram Channel to get article updates.

 

Start – What is a command?

 

A command is some text you write on a Terminal that is written after a dollar sign ( $ ) or a hashtag sign ( # ) and always followed by pressing Enter. You will make a lot of mistakes so do not hesitate to repeat and correct every single command. You will learn the rest of it by time.

(A Terminal on Ubuntu 24.04 and a command written in it and the result)

 

Go next! 

Do not copy-paste, write them all!

 

Please try your best not to copy and paste but write every single command yourself.

Go next!

1. Running Terminal and first command lines

 

Press Ctrl+Alt+T or find Terminal app on the Ubuntu applications menu. 

Command:

$ sudo apt-get update

 

Output:

[sudo] password for master:

 

What you should do:

Type your password without looking at the screen. There would be no stars.

 

Next Output:

Hit:1 http://kartolo.sby.datautama.net.id/ubuntu noble InRelease
Hit:2 http://kartolo.sby.datautama.net.id/ubuntu noble-updates InRelease
Hit:3 http://kartolo.sby.datautama.net.id/ubuntu noble-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
Reading package lists… Done 

 

Picture: 

(Picture 1: your first command and first time typing password on Terminal)

What you should do:

Nothing. Know that the command above is finished successfully. Now you should understand how to do a command on Ubuntu already. 

 

Go next!

 

2. Reading your basic system information

 

Commands:

$ uname -a

$ lsb_release -a

$ cat /etc/apt/sources.list.d/ubuntu.sources

$ lscpu

$ lspci

$ lsusb

$ lsblk

$ lshw

 

Outputs:

1st command uname (short for unix name) will show your kernel version number such as 6.8.0  and what is the name of your operating system that is GNU/Linux. 

 

 

(Picture 2.1: $ uname -a)

 

2nd command lsb_release (short for Linux Standard Base) will show your GNU/Linux distribution information that is “Ubuntu 24.04 LTS” codenamed “noble”. It is why this tutorial is entitled “Noble”. This is important! 

 

 

(Picture 2.2: $ lsb_release -a)

3rd command cat (it is not Tom the enemy of Jerry) will show your Ubuntu repository information including what is enabled and what is disabled in it. For your information, Ubuntu repository is the place an Ubuntu user takes all of tens of thousands software packages from. This is important! 

 

For example, meanings of our picture below:

1) our Ubuntu laptop points to an Indonesian repository server (“kartolo”) 2) our Ubuntu enabled both groups of repository top (noble, noble-updates, noble-backports) and bottom (noble-security) 3) and all repository enabled their four divisions (main, restricted, universe and multiverse).

 

(Picture 2.3: $ cat command reading sources.list file)

4th command lscpu (short for list cpu) will show your processor info such as Intel Core or AMD Ryzen with all its details. For example, picture below shows that ours is Intel Core i5 2.6GHz x86_64 architecture 64-bit with ability to operate 32-bit system.

 

(Picture 2.4: $ lscpu )

5th command lscpi (short for list pci) will show your peripheral hardware devices plugged into PCI slots internal to your PC or laptop and they are many such as vga, wifi, ethernet etc. 

 

(Picture 2.5: $ lspci )

6th command lsusb (short for list usb) will show your USB devices including mouse, flash drive, even bluetooth etc. with details.

 

 (Picture 2.6: $ lsusb )

 

7th command lsblk (short for list block devices) will show your hard disk drive(s) information. If you have USB flash drives attached, they will be shown as well. 

 

For example, picture below shows important disk parts of our Ubuntu laptop: 

1) sda is our internal hard disk drive by 298.3G or 320GB2) sdb is our USB flash drive 28.7G or 32GB3) sdb2 is our system partition symbolized by a single slash ( / ) or more or less like C: drive on Microsoft Windows and this is important4) sda1 and sda2 are partitions dedicated to data storages

(Picture 2.7: $ lsblk )

 

8th command lshw (short for list hardware) will show your full computer hardware information. Yes, all of them. Beware that it could be very long.

(Picture 2.8: $ lshw -short )

 

Go next!

3. Running basic applications

 

Tip:

To close a running application press Ctrl+C in the Terminal.

 

Tip:

Press TAB twice to automatically complete long command.

Commands:

$ firefox

$ thunderbird

$ nautilus

$ eog

$ file-roller

$ rhythmbox

$ totem

$ baobab

$ snap-store

$ libreoffice –writer

$ libreoffice –calc

$ libreoffice –impress

 

Outputs:

1st command firefox will run Mozilla Firefox web browser.

2nd command thunderbird will run Mozilla Thunderbird email client. 

3rd command nautilus will run Files file manager. This is important. 

 

(Picture 3.3: background: command line $ nautilus | foreground: Files running)

 

4th command eog (short for Eye of GNOME) will run Image Viewer.

5th command file-roller will run Archive Manager. 

6th command rhythmbox will run Rhythmbox Music Player.

7th command totem will run Videos.

8th command baobab will run Disk Usage Analyzer.

 

(Picture 3.8: background: $ baobab command line |
foreground: Disk Usage Analyzer running) 

9th command snap-store will run App Center.

10th command libreoffice will run Writer (Word alternative).

11th command will run LibreOffice Calc (Excel alternative).

12th command will run LibreOffice Impress (PowerPoint alternative). 

 

 (Picture 3.10: background: $ libreoffice –writer command line |
foreground: Writer running)
 

Tip: 

To close a running application press Ctrl+C in the Terminal.

 

Go next!

 

4. Visiting a website

 

Commands:

$ firefox www.ubuntu.com 

$ firefox www.gnu.org

$ firefox www.kernel.org

 

Outputs:

1th command will run Firefox visiting Ubuntu official website. 

2nd command will visit The GNU “wildebeest” Operating System official website.

3rd command will visit The Linux “penguin” Kernel official website.  

 

Do not worry with lines of message showing below your command, they are normal.

(Picture 4.1: background: $ firefox www.ubuntu.com command line |
foreground: Firefox web browser visiting The Official Ubuntu Website)

Go next!

 

5. Downloading a file from the internet, opening a file and basic navigation

 

Commands:

$ wget gnu.org/education/rms-education-es.ogv

$ wget telegram.org/dl/desktop/linux -O telegram.tar.xz

$ totem rms-education-es.ogv

$ file-roller telegram.tar.xz 

[ Archive Manager will show > click Extract > click Extract > this will result in a new folder “Telegram” in the Home directory ]

$ ls

$ cd Telegram

$ ls

$ ./Telegram

Press Ctrl+C to close Telegram Desktop.

$ cd ..

$ pwd 

$ ls

 

Outputs:

1st command downloads a video by size 18MB in OGV format.

(Picture 5.1: background: the command and the process |
foreground: the result is a video file by 17MB saved in Ubuntu current user directory)

2nd command downloads Telegram and saves it as “telegram.tar.xz” file name. Pay attention to “-O” addition as it commands the computer to save the file as name you wish. 

 

(Picture 5.3: background: the command and the process | foreground: the result Files showing a file telegram.tar.xz by 50MB in a well-known .tar.xz format)

 

3rd command plays the video using Videos and it is in OGV format (a free format supported by Ubuntu out of the box). Here’s Dr. Richard Stallman the founder of the Free Software Community explaining Free Software in 5 minutes. 

 

 

(Picture 5.4: background: command to play video |
foreground: video player plays the video)

4th command open the file using Archive Manager in tar xz format (a kind of file known as “compressed archive” and it is similar to both zip and rar). You need to Extract this file to get a copy of the folder and files contained in it.

 

(Picture 5.4: background: how to open a compressed archive file |
foreground: the result is Archive Manager opening the contents of the archive file)

5th-8th commands will list content of directory then go into Telegram directory and finally execute Telegram executable file (or similar to double-click). Pay attention to dot slash “./” that is the execution command. Pay more attention that the executable file does not have dot exe “.exe” nor dot apk “.apk” in its name and that is the tradition on GNU/Linux.

(Picture 5.5: background: an example of executing an executable program in Terminal | foreground: a program Telegram Desktop is being executed and running)

8th-12th commands (a team of “pwd cd ls”) will go outside current directory by one step and show address and contents of it. These are the basics of navigation! 

 

 

 (Picture 5.8: a team of “pwd cd ls” commands is the basic of navigation)

Note: the Free Software Community, that is name of our community worldwide, often use this format “tar xz” so it’s wise for you to know.

Note: In the 2nd command, pay attention to -O (uppercased ‘o’ letter) and do not confuse it with -o (lowercased ‘o’) for each one gives different effect.

 

6. Viewing basic image files and renaming them

 

Commands:

$ wget gnu.org/graphics/heckert_gnu.transp.small.png

$ wget kernel.org/theme/images/logos/tux.png

$ wget upload.wikimedia.org/wikipedia/commons/7/76/Ubuntu-logo-2022.svg

$ wget foundation.gnome.org/wp-content/uploads/sites/12/2021/03/GnomeLogoHorizontal.svg

 

Tip: press TAB to auto-complete a long file name below.

Example and exercises:

$ eog heckert_gnu.transp.small.png

Try to open other pictures by yourself!     

Example and exercises:

$ mv -v heckert_gnu.transp.small.png   gnu.png 

Try to rename other files into linux.png, ubuntu.png and gnome.org by yourself!

Results:

1st-4th commands download logo files of GNU operating system “wildebeest”, Linux kernel “penguin”, Ubuntu “circle of friends” and GNOME “foot and people”. 

 

(Picture 6.1: background: the commands downloading the pictures | foreground: a file manager showing the contents of Home directory with pictures of GNU, Linux, Ubuntu and GNOME)

5th-8th commands show the pictures one by one by using eog command (short for Eye of GNOME) the default image viewer of Ubuntu. 

 

 

(Picture 6.2: four eog commands (not visible here) running to view GNU, Linux, Ubuntu and GNOME pictures as separate windows)

9th-12th commands rename the files by using mv command (short for move). Now they are better to read than before. 

 

 

(Picture 6.3: top: commands to rename files showing before and after of the renaming | bottom: a file manager showing the same pictures but with different file names now)

7. Install a program and a game

 

Finally this is the last exercise in this tutorial.

 

Important:

Installing programs on Ubuntu requires internet access. On the other hand, removing them can be done offline.

Commands:

$ sudo apt-get install gimp

$ sudo apt-get install freedoom

$ sudo apt-get remove gimp freedoom

$ sudo apt-get install gimp freedoom 

Outputs:

1st command will install GIMP a free photo editor software — that is, a libre alternative to Photoshop from GNU operating system. 

 

(Picture 7.1: background: command to install a program on Ubuntu “gimp” | foreground: the program is running “GIMP’ editing a photo from Ubuntu 24.04 official wallpapers “Rainbow lightbulb” by Daniel Micallef)

2nd command will install a Doom game — that is, a libre version of legendary first-person-shooting game — you play an adventure to defeat all zombies. On Ubuntu applications menu, it will appear as two choices “Freedoom 1” and “Freedoom 2” you can play which one you wish.

 

(Picture 7.2: background: command line to install a program on Ubuntu “freedoom” | foreground: Freedoom game running ready to play)

3rd command will remove both programs altogether, gimp and freedoom, that is, deleting them completely from your hard disk drive.

4th command will reinstall both programs once again. 

Go next!

 

Finish – You Have Learned Basic Commands!

 

Repeat from the Start again until you managed to do all commands above without any error at all. Try to finish it in one week (seven days). Once you reached that, you will feel a sense of accomplishment. Congratulations! See you in the next tutorial “Command Lines for Filesystem.” 

****

This article is licensed under CC BY-SA 3.0.

More In Technology News

Contact Data Fidelity

Send us a quick message, and we will endeavour to contact you as soon as possible. 

Alternatively, feel free to use our complimentary Quote Tool service to find our how much a new website will cost you today.

Contact Us

Take control of the internet

Download a FREE copy of our E-book, covering:

  • Origins of the internet, CERN & The GNU Philosophy
  • Misconceptions around the internet & its best practices
  • Database Architecture & Design
  • Exiting Big Tech
Book Subscription
Skip to content