General
cancel
Showing results for 
Search instead for 
Did you mean: 

/dev/pts /dev/shm and vt/0 vt/1 ???

Maaz
Valued Contributor

/dev/pts /dev/shm and vt/0 vt/1 ???

when issue the command # cat /etc/proc following three lines are also part of the output:

usbdevfs on /proc/bus/usb type usbdevfs
none on /dev/pts type devpts
none on /dev/shm type tmpfs

I wana know, what these lines shows??? whats /dev/pts, and whats /dev/shm ???

Second what are vt/0 vt/1 vt/2 ....
I found them in /etc/securetty

Thanks billion
Maaz
9 REPLIES
Claudio Cilloni
Honored Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

/dev/shm is a filesystem that uses RAM instead of physical harddisks, so the access to the files it contains is extremely fast. It's size is usually half of the physical RAM installed on your machine.
It is configured in /etc/fstab; editing the line with '/dev/shm' you can change its mount point or remove it if you don't need it.

ask for more informations, if you want.

hth,
Claudio
Maaz
Valued Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

many thank Claudio Cilloni. yes I wana ask more, and that is u didnt explain abt /dev/pts
And also I have asked abt vc/0 vc/1 and vc/2 ... these are found in the /etc/securetty file, so what are these???
Mark Grant
Honored Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

The files in /dev/pts are pseudo terminals. That is, there are terminal devices for terminals that are not real screens. Things such as xterm sessions will all use /dev/pts/something. You can open an xterm and type "tty" to see for yourself.

Your /dev/vt/0 is a bit odd though. Generally speaking, /etc/securetty contains /dev/tty1 through to /dev/tty7 and these are the virtual terminals your get by going ALT-F1 to ALT-F7 on your console (except when you're running X in which case it is CTRL-ALT-F1 to get the first firtual terminal). I therefore suspect that you either have these devices symbolically linked to /dev/vt/0 etc or you have a card with multiple serial ports attached to your machine which uses those device names.
Never preceed any demonstration with anything more predictive than "watch this"
Maaz
Valued Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

i m sorry this is not vt/0 ... but it is vc/0 vc/1 vc/2...
#cat /etc/securetty
vc/0
vc/1
vc/2
.
.
.
tty1
tty2
.
.
.

So now please let me know abt these vc/x, that what are these and when they used etc..

Many Thanks
Regards
Maaz
Maaz
Valued Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

ok Mark I understand abt /dev/pts... many many Thanks, but u didnt explain why it is mounted, if it is simply a directoy, then why it is mounted as other filesystem??? although /dev/pts is not a filesystem.

Regards
Maaz
Mark Grant
Honored Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

Maaz,

You have /dev/pts mounted! Never seen that before. Could you post the output of "df"
Never preceed any demonstration with anything more predictive than "watch this"
Maaz
Valued Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

well i didnt find /dev/pts mounted by issuing 'df' command, but I always find /dev/pts mounted whenever i issue 'mount' command.

#mount
/dev/hda9 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda7 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620) ***here is /dev/pts I asked and mentioned****
/dev/hda13 on /home type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda14 on /tmp type ext3 (rw)
/dev/hda11 on /usr type ext3 (rw)
/dev/hda10 on /var type ext3 (rw)
/dev/hda8 on /mnt/g type vfat (rw,noexec,nosuid,nodev)


#df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda9 497829 82385 389742 18% /
/dev/hda7 124427 9383 108620 8% /boot
/dev/hda13 248895 4531 231514 2% /home
none 63080 0 63080 0% /dev/shm
/dev/hda14 124427 4754 113249 5% /tmp
/dev/hda11 5036284 1684244 3096208 36% /usr
/dev/hda10 396623 51961 324181 14% /var
/dev/hda8 7158992 2217872 4941120 31% /mnt/g

and please also let me know abt vc/0 vc/1 .., what are these vc/x are???

#cat /etc/securetty
vc/0
vc/1
.
.
.tty1
tty2
.
.

Regards,
Maaz
Mark Grant
Honored Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

Ok, this is what it is, I've cut this straight out of the kernel configuration help test.

You'll then get a virtual file system which can be mounted on
/dev/pts with "mount -t devpts". This, together with the pseudo
terminal master multiplexer /dev/ptmx, is used for pseudo terminal
support as described in The Open Group's Unix98 standard: in order
to acquire a pseudo terminal, a process opens /dev/ptmx; the number
of the pseudo terminal is then made available to the process and the
pseudo terminal slave can be accessed as /dev/pts/. What was
traditionally /dev/ttyp2 will then be /dev/pts/2, for example.

The GNU C library glibc 2.1 contains the requisite support for this
mode of operation; you also need client programs that use the Unix98
API. Please read Documentation/Changes for more information
about the Unix98 pty devices.

Note that the experimental "/dev file system support"
(CONFIG_DEVFS_FS) is a more general facility.
Never preceed any demonstration with anything more predictive than "watch this"
Maaz
Valued Contributor

Re: /dev/pts /dev/shm and vt/0 vt/1 ???

sory I m replying late

Thanks a billion Mark, for such an explanation.

Well could u or any other GURU, please also explain abt vc/x
#cat /etc/securetty
vc/0
vc/1
vc/2
.
.
.

Thanks Once again