Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, unmounting is implemented in a filesystem.

Changing video resolution is implemented in a computer program that keeps track of and manages the display on a monitor with use of video rendering hardware.

In the command-line you can change the resoultion (I have done so in Ubuntu, which is essentially Linux under the hood).

Does parsing the command interface the Linux Kernel API similar to doing so in a GUI-program to alter the resolution, or does the CLI differ in this form?

Hopefully my question is not too confusing. If it is, I will edit appropriately.

share|improve this question
I see no reason for the downvote. – dodgethesteamroller Oct 3 '15 at 1:14

In Linux, there is really no meaningful distinction between GUI applications and terminal applications. Actually, X is just another application -- it happens to do some pretty complex stuff, but as far as the OS is concerned, there is nothing special about it. Anything that X can do, any other application can do, and in the end, X is all about managing the display and input devices and exposing a unified API to do things like drawing to the screen and reading pointing device input, regardless of the underlying hardware. Various toolkits such as Qt, GTK and others build upon that to provide a more high-level approach to developing userland applications, offering such advanced features as input text boxes, menus, clickable buttons, list views and more.

Some Linux applications even expose double user interfaces, selecting which one to use depending on whether there is a display attached to the current terminal or not. More have separate builds depending on whether you want an X interface or not. Examples might be Emacs and Vim.

This is in stark contrast to e.g. Windows or (I believe) OS X, where the GUI is for all intents and purposes an inseparable part of the operating system itself. Look at Windows Server Core, for example; they did away with Explorer and a whole bunch of other things, but they kept the GUI right there, except by default it just drops you to a command prompt window! Now that takes some getting used to.

The Linux kernel doesn't concern itself with any command line, other than its own (the one you can edit through the boot manager). Anything beyond that (including $PATH handling and file name globbing) is handled by userspace applications like the GNOME desktop, the bash shell, the system initialization application (normally /sbin/init -- although that one is somewhat of a hybrid between a part of the kernel and a userland program like any other, it executes in user space and has no special privileges granted by the kernel), the text editor, or what have you.

And Ubuntu isn't "essentially Linux under the hood"; it is a Linux distribution, like Debian, Slackware, RHEL, SuSE or any number of others. They probably package some software of their own just like pretty much every other mainstream distribution, but there's nothing non-Linux about it. It is closely related to Debian though, which can be used without Linux (that's Debian/kFreeBSD, which is pretty much the same old Debian but running on top of the FreeBSD kernel).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.