Linux: How to use USB pen / flash stick

More and more people these days using the USB pen and flash memories instead of floppies and CDs. They come is different sizes from 128MB upto 2 GB. Moreover, may new Linux user find it difficult to use usb devices, the main problem is people don’t understand how it works…

USB devices use SCSI devices names

SCSI devices such as /dev/sda use to represent your first USB pen/stick and equivalent partitions are as follows:

Sample 256 MB USB PEN (E: is 100 MB, F: is rest of the free space)
Linux Partition => Windows XP/NT
/dev/sda1 => E: (assuming that C: is hard-disk; D: is VD/CD/RW)
/dev/sda2 => F: (assuming that C: is hard-disk; D: is DVD/CD/RW; E: is first drive USB pen 100 MB drive)

Linux Kernel must have support for USB

Linux kernel must compiled with support for
i) SCSI disk
ii) USB Support
iii) USB Mass support

Most of the modern Linux distribution comes with all sort of support. If it is not included, get latest kernel from and make sure you compile it with above features + file system support such as ext2/3, vfat and so on…

Commends to mount USB Pen / Flash memory stick under Linux

a) Log in as the root user (or use sudo command)

b) Create a mount point
# mkdir –p /mnt/pen
# mkdir –p /mnt/pen

c) To mount the disk run mount command:
# mount /dev/sda1 /mnt/pen

This command will mount MS-Windows XP/Vista E: into /mnt/pen

d) To use it or to see your files:
# cd /mnt/pen
# ls –l

e) To copy files from /home/rdl/*.c to directory to pen drive us cp command:
# cp –v /home/rdl/*.c /mnt/pen

f) You can use rest of the all command such as rm, rmdir, mv etc to copy, move or delete files.

g) To format the /dev/sda2 as Linux ext3 partitions use the following command:
# mkfs.ext3 /dev/sda2

h) To delete all partition and to create new partition use run fdisk program:
# fdisk /dev/sda

Refer to fdisk man page for more information on how to delete and create partitions.

g) To list all partition on all devices use the following command:
# fdisk –l

h) Use dmesg command to get more info on your USB devices:
# dmesg | grep –i "usb"

i) Run scandisk (window like stuff) on /dev/sda1:
# umount /dev/sda1
# fsck /dev/sda1

Further readings:

=> See the detailed guide USB Flash Memory HOWTO

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
18 comments… add one
  • Ronald Calzada Nov 14, 2011 @ 13:41

    Cheers for the Article, its my second time visiting your page and must say it is very interesting hope to check back soon.

  • bisl Aug 14, 2011 @ 20:52

    Thanks. This helped me.
    Short and sweet. Actually more information than I needed, but I found the parts that I needed easily.

  • ad Apr 26, 2010 @ 10:56

    Later distros automatically mount USB devices, but don’t seem to list the ‘sda/sdb’ they have assigned in dmesg, or anywhere else I can find. What command will show both the name of the device (like Kingston USB) and the automounted path (like /dev/sdb1)?

    Any help appreciated 🙂

  • jae Apr 22, 2010 @ 13:36

    I am new in Linux.

    I would like to use USB in Linux. But I got a problem.

    After typing “cp -v /home/rd1/*.c /mnt/pen”, I got an error message like,

    cp: cannot stat ‘/home/rd1/*.c : No such file or directory.

    Please help me.

  • Makepeace Ruzive - Zimbabwe Sep 10, 2009 @ 13:23

    Clear as crystal,

  • riya Mar 29, 2009 @ 11:03

    what is this sda1, i have linux and in my $ dev folder i do not have sda1 or sda but i have hda1 etc

  • sasikumar Jan 2, 2009 @ 10:13

    sir how to run not enable redhat linux 8.0 version not run usb pendrive use how please send to detalis e-mail sir how to

  • Sk Shahin Rahman Dec 13, 2007 @ 14:11

    i want make a folder tar and send it directly to usb so that it does not in my server. if any solution pls help me

  • Babak May 25, 2007 @ 11:35

    Thank you for technical help.

    Is it possible to have USB Flash Memory HOW To document in .pdf or .doc formats to be saved or download. I’m learnig Linux OS and my Linux Kernel is 2.6 (Mandrakelinux 10.1). Is there any GUI way of using USB pen on this version of OS?

    Many Thanks in advance

  • majid Dec 26, 2006 @ 15:00

    Hi, i’m a new learner of Linux. I installed a RedHat 9 Professional Edition in my workstation. When I plug in usb thumb drive to the usb port of PC, it wouldn’t detect. Is it RedHat 9 not support for the usb flash? If yes, how could I upgrade my PC to detect the usb flash? TQ.

  • 🐧 nixCraft Dec 25, 2006 @ 6:15


    Meta tag is updated.

    Appreciate your post.

  • jercos Dec 25, 2006 @ 4:56

    You my good man, need to change your charachter encoding to UTF-8. there was quite a few symbols (all hyphens for example) that were messed up because the encoding was set to ISO-8859-1 by default… the meta tag is your friend 😛

  • 🐧 nixCraft Dec 2, 2006 @ 14:21


    Red hat 7.2 is too old. Get latest distro and you should able to use usb pen or drive. Old version has some issues. I recommend getting Fedora Core or Ubuntu Linux

  • Peter Dec 2, 2006 @ 11:35

    Sir, I wish to seek for assistance. I’ve installed the Redhat Linux package 7.2 and i’m unable to mount my flash stick. I would be happy if i could be given some assistance. Thanks in advance.

  • Anonymous May 4, 2006 @ 0:26

    thanks a lot in advance. I am not on my system currently but I know damn sure its gonna work and will bring to end to all my pain of error mounting CDROM just to install an app that doesn’t have internet access.

  • Anonymous Dec 16, 2005 @ 7:36

    Thanks a bunch for this post, it helped me a lot.

  • Anonymous Sep 25, 2005 @ 9:40

    Thank you muchly! Worked awesomely!

  • Anonymous May 26, 2005 @ 11:23

    Thanks for good post 🙂 It worked for me…

Leave a Reply

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

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @