How to Create Linux USB from Command Line

Hey guys in this short tutorial i will show you how simple it is to create a linux usb from command line.

We have already have CentOS 7 iso image on our computer( which we downloaded earlier from Centos website).

To list your usb issue the command

  salman@Sal-Linux:~/Downloads$ lsblk 
sde      8:64   1  28,9G  0 disk 
 ├─sde1   8:65   1   1,8G  0 part /media/salman/Linux Mint 20 Xfce 64-bit
 ├─sde2   8:66   1   3,9M  0 part 
 └─sde3   8:67   1  27,1G  0 part /media/salman/writable

As you can see , my usb is sde and has a Linux Mint image, however i would like CentOS 7.

To burn CentOS 7 image on the usb issue the following command:

root@Sal-Linux:/home/salman/Downloads# dd if=/home/salman/Downloads/CentOS-7-x86_64-Minimal-1804.iso of=/dev/sde oflag=direct bs=1048576

Where:

/dev/sde is my USB drive
of = output file to write to
if = input file to read from
bs = This option enables dd command to read and write bytes per block, default size is 512 Bytes, I am using around 1 MB.

oflag = direct
Use direct I/O for data, avoiding the buffer cache. Note that
the kernel may impose restrictions on read or write buffer
sizes. For example, with an ext4 destination file system and
a Linux-based kernel, using ‘oflag=direct’ will cause writes
to fail with ‘EINVAL’ if the output buffer size is not a
multiple of 512.

Thanks,
Salman A. Francis
https://www.tekco.net
https://www.youtube.com/linuxking

2 Comments

  • ECKHOFF214

    Thank you!!1

    • hyp3ri0n

      You are Welcome

Leave a Reply

Your email address will not be published. Required fields are marked *

Impact Financial

Good draw knew bred ham busy his hour. Ask agreed answer rather joy nature admire wisdom.

Latest Posts

  • All Posts
  • Amazon
  • Amazon EFS
  • apache
  • AWS
  • aws backup
  • aws cli
  • aws cli version 2
  • aws sync
  • Banking
  • bash scripting
  • Budgeting
  • cloud
  • cyber attack
  • cyber scam
  • database
  • efs
  • Email
  • Email Client
  • Email Server
  • Insurance
  • Investing
  • Learning
  • lets encrypt
  • Linux
  • php
  • pip
  • postgresql
  • python
  • S3
  • s3 buckets
  • scam prevention
  • scams
  • security
  • ssl
  • Tax Strategies
  • Troubleshooting
  • website
  • wordpress
  • wordpress setup
    •   Back
    • Linux tips
    •   Back
    • nextcloud
    •   Back
    • Rainloop

Categories

Tags