[SOLVED] How do I access my external hd's via terminal?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
SnuffGear

[SOLVED] How do I access my external hd's via terminal?

Post by SnuffGear »

My external hd's mount when I boot the computer and they are accessible via the file manager but I can't figure out how to access them via terminal.

tom@tom-Inspiron-3847 ~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 139.7G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda3 8:3 0 372.5G 0 part
└─sda5 8:5 0 14.9G 0 part [SWAP]
sdb 8:16 0 3.7T 0 disk
└─sdb1 8:17 0 3.7T 0 part /media/tom/My Book4TB
sdc 8:32 0 2.7T 0 disk
└─sdc1 8:33 0 2.7T 0 part /media/tom/My Book3TB
sr0 11:0 1 1024M 0 rom

Thanks
ps. still a newbie when it comes to the 'terminal'.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: How do I access my external hd's via terminal?

Post by WharfRat »

Check the /media/user folder with ls -lh /media/$USER
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How do I access my external hd's via terminal?

Post by Flemur »

SnuffGear wrote: Wed Apr 25, 2018 10:37 am
├─sda1 8:1 0 139.7G 0 part /

Code: Select all

cd /
└─sdb1 8:17 0 3.7T 0 part /media/tom/My Book4TB

Code: Select all

cd /media/tom/My\ Book4TB
└─sdc1 8:33 0 2.7T 0 part /media/tom/My Book3TB

Code: Select all

cd /media/tom/My\ Book3TB
You should probably rename "My\ Book[3,4]TB" to something without a delimiter (the space) in the name: it's almost guaranteed to cause you problems at some point. (not an OS kinda problem, but entering "cd /media/tom/My Book3TB" without the ugly backslash, or uglier quotes around it, will return

Code: Select all

bash: cd: /media/tom/My: No such file or directory
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
SnuffGear

Re: How do I access my external hd's via terminal?

Post by SnuffGear »

WharfRat wrote: Wed Apr 25, 2018 10:41 am Check the /media/user folder with ls -lh /media/$USER
drwxr-xr-x 8 tom tom 4.0K Oct 25 05:09 Data
drwx------ 1 tom tom 44K Apr 12 10:42 My Book3TB
drwx------ 1 tom tom 16K Apr 21 08:55 My Book4TB
SnuffGear

Re: How do I access my external hd's via terminal?

Post by SnuffGear »

Flemur wrote: Wed Apr 25, 2018 11:08 am

└─sdc1 8:33 0 2.7T 0 part /media/tom/My Book3TB

Code: Select all

cd /media/tom/My\ Book3TB
Sweet! Worked perfectly. Thanks
WharfRat

Re: [SOLVED] How do I access my external hd's via terminal?

Post by WharfRat »

You can also enclose the folder location in quotes e.g., cd "/media/$USER/My Book3TB" when the path contains spaces :wink:
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How do I access my external hd's via terminal?

Post by Flemur »

SnuffGear wrote: Wed Apr 25, 2018 11:12 am

Code: Select all

cd /media/tom/My\ Book3TB
Sweet! Worked perfectly. Thanks
You can try getting tricky with ... LINKS!

Code: Select all

ln -s "/media/tom/My Book3TB"  ~/mybook3
cd ~/mybook3
Also try

Code: Select all

ls -l ~/mybook3
and it should point to "/media/tom/My Book3TB"
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Beginner Questions”