Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make a bootable flash drive with Linux on it for my Mac. I have Ubuntu desktop downloaded, and it is in my downloads. The instructions on the Ubuntu website tell me I need to convert the ISO to IMG (of course, because its a Mac, and I cannot boot otherwise, so converting is necessary). This is the terminal command they tell me to run:

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

I understand I need to replace both paths, and I know I need to change the ubuntu.iso path to the file located in my downloads, but what path do I put in the place of ~/path/to/target.img? Can someone give a specific example? I tried putting ~/Users/Gurpreet/Desktop/target.img, but it says no such file or directory. I understand that there is not a file named target.img on my desktop. What path do I use? Specific example and help will get 10 points.

share|improve this question
up vote 3 down vote accepted

The tilde expands to "$HOME", so when you write ~/Users/Gurpreet/Desktop/target.img what you've really written is /Users/Gurpreet/Users/Gurpreet/Desktop/target.img. Just get rid of the redundancy and write one (the tilde) or the other (/Users/Gurpreet).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.