How to Create Live USB in Linux Terminal With dd Command

How to Create Live USB in Linux Terminal With dd Command

This guide is about How to Create Live USB in Linux Terminal With dd Command. So read this free guide, How to Create Live USB in Linux Terminal With dd Command step by step. If you have query related to same article you may contact us.

How to Create Live USB in Linux Terminal With dd Command – Guide

There are several graphical tools available for creating live USB. Etcher on Linux is probably the most popular. Ubuntu has its own Startup Disk Creator tool for this purpose.

However, advanced Linux users swear by the comfort and speed of creating active USBs in the Linux terminal using the dd command.

The dd command is a CLI tool that provides a powerful tool features to copy and convert files.

A common use case that people use dd for is burning ISO files to an external storage device, such as a USB drive, which can be used to do things like install a new Linux distribution on a computer or laptop.

That’s what I’m going to show in this tutorial. I’ll go over the commands you’ll need to run, find our USB drive in the terminal, and finally flash the actual ISO file.

Creating live USB from ISO with dd command

Before I show you the steps, I’m going to take a quick look at the command you’ll use and explain what it does.

Understanding the dd command above

First, you enter dd. As expected, this is just the name of the program you will run.

Then you specify if = “./filename.iso”. if stands for input file, which tells dd which file you will write to the external storage drive.

After that, you enter f=”/dev/sdb”. As with if, of simply means output file.

It is important to remember that the output file does not technically need to be a file on your system. You can also specify things like the path to an external device (as shown in the example), which just visual like a normal file on your system, but it actually points to a device connected to your machine.

status can be set to three options: none, noxfer and progress.

The progress option you set will cause dd to show periodic statistics on how much of the ISO has moved to the storage unit, as well as an estimate of how long it will take for dd to complete.

If you had set the none option instead, dd would only print error messages while burning the ISO, thus removing things like the progress bar.

The noxfer option hides some information that is printed after a transfer completes, such as how long it took from start to finish.

Lastly, you set the conv option to fsync. This causes dd not to report a successful burn until the entire ISO has been written to the USB drive.

If you omit this option, dd will still write fine (and may actually appear to run faster), but you may find that your system is taking a while before saying it is safe to remove the USB drive as it will finish burning the ISOs content in the background, allowing you to do other things in the meantime.

Now that you understand what you need to do, let’s see how to Knife.

Step 0: Download the desired ISO

It goes without saying that you need an ISO image file to flash to a USB.

I’m going to use Ubuntu 20.04 ISO (download here) to test the dd command I showed you earlier.

Step 1: Get the USB disk label

Connect your USB disk.

The specific path I typed in was /dev/sdb. USB disks are usually labeled / dev / sdb, but this is not a hard and fast rule.

This path may be different on your system, but you can confirm the drive path with the lsblk command. Look for a list that matches the size of your USB drive and you’re done.

If you are more familiar with GUI programs, you can also find the drive path with tools like GNOME disks.

Step 2: Burning the ISO file to the USB disk

Open up a terminal in the directory where the ISO file is downloaded and run the following (remember to replace /dev/sdb with the name of your storage device if it’s something different):

Final note

I hope you like the guide How to Create Live USB in Linux Terminal With dd Command. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.

We will be happy to hear your thoughts

      Leave a reply

      Compsmag
      Logo