Chinaunix首页 | 论坛 | 博客
  • 博客访问: 481358
  • 博文数量: 148
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1553
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-23 23:09
文章分类

全部博文(148)

文章存档

2010年(6)

2009年(58)

2008年(84)

我的朋友

分类: LINUX

2008-03-05 17:50:57

第三章的主要内容:

❑ Files and devices

❑ System calls

❑ Library functions

❑ Low-level file access

❑ Managing files

❑ The standard I/O library

❑ Formatted input and output

❑ File and directory maintenance

❑ Scanning directories

❑ Errors

❑ The /proc file system

❑ Advanced topics: fcntl and mmap

几个概念的解释:
tty:
TTY is a short form of several things:
  • or Teletype, a typewriter with an electronic communication channel
    • Teletypewriter as a common name for telecommunications device for the deaf (TDD)
    • A generic term for any computer or associated
      • , a command that outputs the name of the current terminal. This is equivalent to the string that would be returned by the ttyname(3) library function.
pts/0
First, thanks. Ok I understand the following ( I even know that
teletypes were primary output devices after the punch cards; I am with you
on that part.) about dummy terminals and command prompts in the post punch
card days before the almighty Xserver. I am with you. RE: In the
beginning......", there was no X and you could only login
> to REAL ttys, ie. "boot in ascii mode". But that was a long
> time ago.

right. ok, I already know about pseudo terminals, teminal emulators,
availiable consoles with + IE + . I knew about
+. I DIDN'T KNOW ABOUT starting additional X sessions and their
key assignments as in :
>By the way, you can have a second X server going, to really make things
> interesting.
> Go to a REAL console, like and type in
> startx -- :1
>
> Now you have :0 on and :1 on .
> Look at the "who" for ptys on .

THANK YOU! Today has been a good day in that I have learned something new. I
thank you. Also I know+ is the actual console for shell messages.

I still get the following after a regular SuSE KDM-logon for $who with
Konsole
max@linux:~> who
max :0 Sep 5 17:13 (console)
max pts/0 Sep 5 17:13
max pts/1 Sep 5 19:44
max@linux:~>

obviously pts/1 is my Konsole session

But is :0 primary intial session , and pts/0 X-server session ?
or is it that pts/0 is the xconsole for error/sys messages + ?




On Thursday 05 September 2002 06:03 am, zentara wrote:
> On Thu, 5 Sep 2002 04:08:53 -0700
>
> Max Webb wrote:
> > Thanks. I know about the 1970's dummy terminal/ mainframe concept, and
> > knew that PTS stood for pseudo terminal (and "s" I thought might be
> > session). So its pseudo terminal slave....Now here is the strange part.
> > I know that I have one true hardware terminal :0 (what ever it is called)
> > and I had one terminal emulator open (Konsole) which would be pts/0 . I
> > didn't have any other terminal emulator sessions open. Why the pts/1
> > then ?!?!
>
> The pts/1 may be some hidden program you started. All the programs
> have a point of origin. Maybe pts/1 is some KDE program that needs a
> console to start.
>
> "In the beginning......", there was no X and you could only login
> to REAL ttys, ie. "boot in ascii mode". But that was a long
> time ago.
>
> It looks like you are booting directly into X (the windows system).
> For your learning experience, try hitting the key combo
> you will drop out of X and be at the REAL
> consoles. Login and see what "who" tells you.
> thru are your basic REAL consoles.
> is reserved for X.
>
> Once you start X, and create Xterms, they are assigned pty numbers
> to keep track of them. There is a kernel parameter which sets the
> limit, I think 256 is the max. The X server number, becomes their
> reference. The first X server number is :0.
>
> By the way, you can have a second X server going, to really make things
> interesting.
> Go to a REAL console, like and type in
> startx -- :1
>
> Now you have :0 on and :1 on .
> Look at the "who" for ptys on .
>
> > Also and even more important: You seem very knowledgable, could you
> > recommend some good (books) UNIX/Linux dictionaries that
> > also contain acronyms like pts (etc) and good definitions. Also, what
> > are some good reference books on Linux/UNIX?
> > or online forums for UNIX/LINUX novices to gain knowledge from?
> > I really need some advice. Thanks again. Max the IBM fan.
> >
> > I really want and need to learn, and not just be a GUI moron.
> >
> > P.S. Just bought an IBM Laptop and SuSEd it ... am reading this on a 21"
> > IBM P260 CRT.
> >
> >
> > THANKS
> >
> > Max
> >
> > On Thursday 05 September 2002 02:50 am, Derek Fountain wrote:
> > > On Thursday 05 September 2002 10:28 am, you wrote:
> > > > I attend a small community college in a rural portion of the
> > > > southwestern U.S. Very few people here even know what Linux is, and
> > > > most of the people, at my small college in the CIS department,
> > > > venerate Bill Gates as some sort of diety.
> > >
> > > A bit conservative are they? ;o)
> > >
> > > > USER LINE LOGIN-TIME FROM
> > > > max :0 Sep 4 21:19 (console)
> > > > max pts/0 Sep 4 21:19
> > > > max pts/1 Sep 4 22:51
> > > > max@linux:~>
> > > >
> > > > I understand everything but the column "LINE". I know that its the
> > > > line to a session, but what do the acronyms pts/0 , pts/1 stand for?
> > > > and I think
> > > >
> > > > :0 means my screen? and what does (console) mean?
> > >
> > > pts stands for pseudo terminal slave. A terminal (or console) is
> > > traditionally a keyboard/screen combination you sit and type at. Old
> > > UNIX boxes would have dozens of them hanging off the back, all
> > > connected with miles of cable. A pseudo terminal provides just the same
> > > facility only without the hardware. In other words, it's an xterm
> > > window or a konsole window, or whatever utility you use. They pop into
> > > life as you ask for them and get given sequential numbers: pts/0, then
> > > pts/1 and so on. The physical console is the hardware which is actually
> > > attached to your box - you probably only have one. That's labelled ":0"
> > > and is refered to as the actual "console".
> >
> > --
> > Be positive and you will prevail.
阅读(1120) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~