LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do you use the terminal to list different drives? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-use-the-terminal-to-list-different-drives-4175410952/)

nitzix 06-11-2012 09:33 PM

How do you use the terminal to list different drives?
 
What is the terminal command to list drives and partitiions in the terminal?

syg00 06-11-2012 09:45 PM

Sounds suspiciously like homework.
What are to trying to achieve, and what have you tried ?.

nitzix 06-11-2012 09:50 PM

Quote:

Originally Posted by syg00 (Post 4701090)
Sounds suspiciously like homework.
What are to trying to achieve, and what have you tried ?.

Well I was trying just trying to figure a way to switch drives using the terminal. I really prefer terminal interface to GUI. I actually a command for it the other day, but now, for the life of me, I cannot remember what command it was.

syg00 06-11-2012 09:59 PM

"parted -l" (or "fdisk -l") maybe. For Ubuntu you'll need to use "sudo".

"df" will show what is mounted - may or may not be what you're looking for. I prefer "df -hT" (see "man df" for details).
"ls" on (almost) anything listed will show lower levels - which can may be able to "cd" into. See the relevant manpages.

nitzix 06-11-2012 10:02 PM

Quote:

Originally Posted by syg00 (Post 4701097)
"parted -l" (or "fdisk -l") maybe. For Ubuntu you'll need to use "sudo".

"df" will show what is mounted - may or may not be what you're looking for. I prefer "df -hT" (see "man df" for details).
"ls" on (almost) anything listed will show lower levels - which can may be able to "cd" into. See the relevant manpages.

Thank you, 'df' was the command I was looking for!

frankbell 06-11-2012 10:11 PM

I like cat /etc/mtab to show mounted drives, especially when I'm finetuning /etc/fstab.


All times are GMT -5. The time now is 11:43 AM.