how to determine which disk partition a root directory belongs to on a linux OS?

I"m trying to determine which disk partition the /opt directory belongs to? The mount command does not display this information, which linux command can answer this question?
areyouready344Asked:
Who is Participating?
 
dolomitiConnect With a Mentor Commented:
hi,
you can use
# df
or
# fdisk -l
(warning with fdisk, becouse it is a disk partitioner, however (see docs if you want), fdisk -l
is a passive command, and also active versions as fdisk /dev/sdb, require saving of modify).

df is a daily command, as ls, you can see %usage
fdisk is a service command, you use just when make partitions or general info that you can store in your doc.

bye
vic
0
 
Gerald ConnollyCommented:
What flavour of Linux and what storage?
0
 
areyouready344Author Commented:
dd command work out great
0
 
dolomitiCommented:
hi,
thank,
probably df not dd
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.