LinuxQuestions.org

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

nitzix 06-11-2012 10: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 10:45 PM

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

nitzix 06-11-2012 10: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 10: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 11: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 11: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 08:43 AM.