TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What is the difference between a terminal, a shell, a TTY and a console? (2012)

274 pointsby ent101over 1 year ago

15 comments

alberthover 1 year ago
Reddit has the most concise answer<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;41u5hw&#x2F;comment&#x2F;cz5ejh6&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;41u5hw&#x2F;comment...</a><p>&gt; A terminal is a physical device with a keyboard and screen connected to a computer running various OS types. A tty is the Unix device name for a physical or virtual terminal connection. A shell is the Unix command interpreter. A console is a generic term for a primary i&#x2F;o device or interface. In unix terms the console is where the boot&#x2F;startup messages are sent to. After bootup the console effectively becomes a terminal.
评论 #38989310 未加载
khazhouxover 1 year ago
Classic Stack Overflow, willfully ignores the likely intent of the questioner, with pedantic answers which ignore the most common modern usages of the terms. Subtle condescension and authoritative declarations (“a console MUST be a piece of hardware”) which are actually incorrect in modern usage.<p>SO really does attract misanthropes.
评论 #38986542 未加载
评论 #38987173 未加载
评论 #38987613 未加载
评论 #38989372 未加载
评论 #38986711 未加载
评论 #39007471 未加载
评论 #38986511 未加载
评论 #38986522 未加载
bitwizeover 1 year ago
A terminal is a device, typically with a screen and keyboard, used to remotely communicate with a computer. Pieces of software that serve this purpose are technically terminal <i>emulators</i>, but in 2024 we just call them terminals because people who use actual terminals, like a VT100 or even an X terminal, are few and far between. So when a Show HN comes along that says &quot;I made a new terminal! It&#x27;s written in Rust and does this or that&quot; they&#x27;re not talking about terminals in the traditional sense but pieces of software, a usage of the term I find... urticating.<p>A shell is a UI to the operating system, used for file management, launching programs, etc. Historically it referred to Unix terminology: the kernel was the bit of the OS that actually performed operations, and the shell was a user friendly wrapper around the kernel&#x27;s system-call interface. Usages drifted, however, and the shell became called upon to do other things, while the one-to-one mapping between shell commands and system calls drifted and was outsourced to external programs (cp, mv, rm, etc.) But the idea that the shell was your UI into system management persisted. Shells can be graphical; Explorer on Windows and Finder on macOS can be considered shells.<p>TTY stands for Teletype, an early form of terminal called a teletypewriter. Like a normal typewriter, it printed on paper rather than having a screen. For historical reasons, Unix systems have device nodes called &#x2F;dev&#x2F;ttyXX to represent terminal connections.<p>The console is the main user interface to the system. On old mainframes and minis, it was a dedicated terminal sitting in the room the computer was in and wired directly to it. Other terminals could be located in another room, building, or far away and might communicate with the computer via modem or other telecom link. Some administrative functions, such as installing the OS itself, could only be performed via the console. Today, a typical PC&#x27;s attached monitor(s), keyboard, and pointing device might be considered the console, and might be abstracted as such through e.g., &#x2F;dev&#x2F;console, or at a lower level, NetBSD&#x27;s wscons(4) kernel driver.
florenover 1 year ago
A terminal is a device for remotely accessing a computer. A TTY is a Teletype, a kind of printing terminal; it takes input one character at a time and outputs one character at a time. A shell is the program that reads what commands the user, sitting at his teletype, wants to invoke. A console is the set of toggle switches on the front of your computer you use to load the bootstrap.
wlamartinover 1 year ago
Recently I&#x27;ve been wondering if there is a &quot;build your own X&quot; for some of these concepts. For example, there is <a href="https:&#x2F;&#x2F;github.com&#x2F;xyproto&#x2F;vt100">https:&#x2F;&#x2F;github.com&#x2F;xyproto&#x2F;vt100</a> which seems relatively straightforward (though maybe not &quot;simple&quot;) to learn from but are there any resources that would actually teach this stuff?
ijhuygft776over 1 year ago
I can almost promise you that if those terms ever become mainstream, their meanings will be totally different then what they are today.
评论 #38987803 未加载
TacticalCoderover 1 year ago
Call me newschool or oldschool or whatever but...<p><pre><code> ... $ tty &#x2F;dev&#x2F;tty1 &lt;- that&#x27;s sorta a modern &quot;tty&quot; ... $ tty &#x2F;dev&#x2F;pts&#x2F;17 &lt;- that&#x27;s a pseudo-tty </code></pre> I like this one:<p><a href="https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;pty-vs-tty" rel="nofollow">https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;pty-vs-tty</a>
评论 #38987353 未加载
wruzaover 1 year ago
Now what’s the difference between a process, a process group, a session, a session leader, a deamon and a background process? &#x2F;jk
estover 1 year ago
I might be wrong, terminal is a physical&#x2F;virtual device that output displays or input typing. A TTY&#x2F;PTY is a mechanism to translate wire protocol bytes (like parse ANSI escape codes). A shell distinguishes bash&#x2F;zsh&#x2F;csh. A console is stdin&#x2F;stdou&#x2F;stderr
jamapyover 1 year ago
I found this answer the question plus some additional background info.<p><a href="https:&#x2F;&#x2F;unixsheikh.com&#x2F;articles&#x2F;the-terminal-the-console-and-the-shell-what-are-they.html" rel="nofollow">https:&#x2F;&#x2F;unixsheikh.com&#x2F;articles&#x2F;the-terminal-the-console-and...</a>
ChrisArchitectover 1 year ago
(2010)
zeroCaloriesover 1 year ago
The definition for terminal and console seem switched for the first answer, and I don&#x27;t think it&#x27;s correct to say tty = terminal.
jibbitover 1 year ago
joe armstrong gave a talk where he recommends &#x27;4 ancient technologies worth learning&#x27;, or some such. one of them is bash, and another is shell (and emacs, and something else). given that it&#x27;s joe - i think he knows what he&#x27;s saying - but it makes no sense with respect to any of these explanations
评论 #38989259 未加载
dvhover 1 year ago
Is it possible to enable sixel support in console (here I mean in the Ctrl+alt+f1 to f6)?
abnryover 1 year ago
And then there are PTYs or psuedoterminals.