How do I mount and use a USB pen or hard disk under OpenBSD operating systems?
OpenBSD does supports USB storage devices such as pen and hard disk via emulated SCSI drives.
First, insert your your USB flash drive in USB socket.
Next type the following command to create a directory (mount point), enter:
# mkdir /mnt/pen
Mount the flash drive using mount command at /mnt/pen, enter:
# mount /dev/sd0i /mnt/pen
You may need to replace /dev/sd0i with actual device name.
Now you can access the files at /mnt/pen:
# cd /mnt/pen
# ls -l
# cp filename /path/to/dir
Finally, unmount the flash filesystem using the following command:
# umount /mnt/pen
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 5 comments… read them below or add one }
“You may need to replace /dev/sd0i with actual device name.”
For people new to OpenBSD, how do you find the actual device name?
Use dmesg. The device shows up in dmesg output after plugging it in. You can also use usbdevs.
How did you know the ‘i’ in sd0i? Dmesg only shows ‘sd0′ with no ending.
Answering my own question:
$ disklabel sd0
At the end, you will see the partitions. The i-label denotes a partition.
another way
# sysctl hw.disknames
will show (example)
$ sysctl hw.disknames
hw.disknames=wd0,wd1,cd0