Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: shell, console, terminal, tty

42 views
Skip to first unread message

Ivan Shmakov

unread,
Feb 20, 2012, 4:28:09 AM2/20/12
to
>>>>> Beta What <lite.o...@gmail.com> writes:

[Cross-posting to news:comp.unix.misc, as the subject is not
quite Shell-specific.]

> tty==terminal==console

"TTY" and "terminal" are indeed used interchangeable most of the
time.

However, "console" may have different meanings. In particular,
it may mean the terminal that the kernel is configured to send
its messages to (/dev/console.) Or, it may mean the "primary"
hardware (video display and keyboard) used for user interaction.
Or it may mean a gaming console [1].

[1] http://en.wikipedia.org/wiki/Video_game_console

> Shell is a program that attached to control a tty/terminal/console.

> All good?

Shell (in "Unix" sense) is an implementation of the Shell
programming language. It can be used interactively, often via a
terminal, but it can also be used to process "script" files,
like:

$ sh hello.sh
Hello, world!
$ cat < hello.sh
#!/bin/sh
printf %s\\n 'Hello, world!'
$

When such a script is used outside of a user's session (e. g.,
detached from it with nohup(1), or started automatically by
cron(8)), there's no terminal the Shell is attached to.

It was recently discussed here [2] that Shell doesn't "control"
a terminal anymore than any other interactive program (such as
Emacs, Vim, or top(1)) does. (Though one may wish to check that
"job control" concept, too.)

[2] news:jhnoeu$3s5$1...@speranza.aioe.org

--
FSF associate member #7257
0 new messages