12

In "Text-based user interface" Wikipedia's article, when talk to text based user interface, the first sentence is:

Not to be confused with Command-line interface.

I can't find some differences between CLI (Command Line Interface) and TUI (Textual User Interface).

Is that true or not?

Pablo Bianchi
  • 15,657
showkey
  • 342
  • 2
    I am no expert on this, so I can't really do a good answer but here is a comparison I found http://marinin.xyz/post/cli-vs-tui/ – Mark Kirby Jan 03 '17 at 11:21
  • Command line uses shell commands, while textual user interface uses text inside the application. – Jacob Vlijm Jan 03 '17 at 11:21
  • 2
    The archived version of Mark Kirby's now outdated link: https://web.archive.org/web/20170728043150/http://marinin.xyz/post/cli-vs-tui/ – Pro Q Jun 19 '19 at 01:06

3 Answers3

9

While the two terms are often used interchangeably, they are slightly different, since as RoVo pointed out, command-line is all about successive lines of text, which are commands. Think back to old teletype type of computers, where you could only type in command, and its output would come out on line of teletype paper.

For text user interface, we can reference such tools as Midnight Commander ( and some old folks will also know Norton Commander ) or ncdu or nano. In those you don't necessarily type in lines of commands, but navigate primitive menu made with ncurses library, and guess what. . . .such program uses text as representation of buttons,borders, etc. Take for instance, htop. The way memory and CPU usage bar represented is simply via # and * symbols.

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
1

You can find the answer in the Wikipedia Article for CLI:

A command-line interface [...] is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines).

pLumo
  • 26,947
  • I think not necessarily untrue for tui. In my windows/mac days, I made Filemaker Pro commands inside Filemaker pro. I wouldn't consider that command line though. – Jacob Vlijm Jan 03 '17 at 11:25
  • Sure, you can issue commands in mc too, but thats just one way of input. --> A TUI may include a CLI. – pLumo Jan 03 '17 at 11:26
  • Mark Kirby paste a good web page which describe the differences between cli and tui in details. – showkey Jan 03 '17 at 11:30
  • It can, but if the command syntax is only valid inside the application, I believe we have a tui, no cli. I am not the expert on this though. – Jacob Vlijm Jan 03 '17 at 11:30
  • That is not true: python or psql are CLIs even if the input is only valid inside the application. – pLumo Jan 03 '17 at 11:40
  • Python is a language, you can run commands within the python shell. – Jacob Vlijm Jan 03 '17 at 12:56
1

Reading the link you provided, I find this sentence:

TUIs display computer graphics in text mode. An advanced TUI may, like GUIs, use the entire screen area and accept mouse and other inputs.

And there are some screenshots too, for example of Midnight Commander.

The difference of the definitions is that a TUI is a customized interface with hotkey and mouse inputs, not a shell where you enter a command line, (a command line interface), for example bash, which is used in Ubuntu.

But both are text based interfaces, that need no graphical desktop environment or window manager.

Pablo Bianchi
  • 15,657
sudodus
  • 46,324
  • 5
  • 88
  • 152