How to create a bootable stick with Linux

Dec 13, 2023

In this article, we will learn how to create a bootable stick with only the commande line.

This is extremely useful for when you need to flash an image on a Stick.

This exemple will creat a bootable stick with the newest version of Ubuntu. I will be using this sitck in another article when I will upgrade my current laptop.

Prerequisite

  • ubuntu-22.04.3-live-server-amd64.iso
  • Any version of Linux
  • USB Key

Let's Go!

The first step is to see what is the correct path of the USB Key.
In order to do so, type the following commande without the USB Key

ls -1 /dev/sd?

I get this

/dev/sda
/dev/sdb

Afer, insert the USB Key and repeat

ls -1 /dev/sd?
I then get this

/dev/sda
/dev/sdb
/dev/sdc

The USB Key path is clearly /dev/sdc

Now, all you need to put is a one liner command:

sudo dd bs=4M if=/path/to/file.iso of=/dev/sdc status=progress oflag=sync

Here /path/to/file.iso is simply the path to your file and /dev/sdc is the path to your USB that we have earlier determined.

To make things easier, I often go into the folder in which I have the ISO.
cd Downloads/Ubuntu

After, I am able to only write the image name

sudo dd bs=4M if=ubuntu-22.04.3-live-server-amd64.iso of=/dev/sdc status=progress oflag=sync

Et voila! No need for a special software! You can now create any bootable stick!