78

I'm just wondering if it is possible to run Windows without its GUI like Linux—with just the virtual terminal (tty)

The reason behind this is that my Windows 7 box often freezes whenever some random application hangs up, such as Firefox (ya even Firefox, Chrome doesn't do that), MSN, Microsoft Office, etc. (I reinstalled countless times and Windows has been like that for every version I used, I think it's really just being like Windows D: )

However, I noticed that although when a program hangs up and thus freezes almost my entire desktop, if I happened to have a console window up (I have SUA, Unix layer built into Windows, installed), just use the kill command, it shuts down that unresponsive application in a blink and returns me a responsive desktop again.

So I'm wondering: is it possible to switch to some text-only interface when the desktop hangs up, just like I sometimes do on Linux?

Alois Mahdal
  • 2,344

10 Answers10

81

Windows Server Core is a 'GUI-less' version of Windows:

Beginning with Windows Server 2008 Microsoft offered the option to install the operating system without large parts of the graphical user interface (GUI). This means when you logon to the server all you get is a command line prompt. There is no Windows Explorer, no start menu and no Internet Explorer among others. You want to set the IP address? Use the command line. Want to reboot? Use the command line. Want to . . . ? Well you get the idea.

For older and non-server versions you can edit the registry key HKEY_LOCAL_MACHINE>Software>Microsoft>Windows NT>CurrentVersion>Winlogon and change the Shell value to cmd.exe instead of Explorer.exe.

Not exactly GUI-free options, but it eliminates Explorer and a lot of the visual 'niceties' that eat all your resources. :)

35

As afrazier suggest, rather looking for convoluted work arounds, why not address the core problem? Sure, you can kill (and re-run) explorer.exe (as techie007 suggests), but tackling the cause of the instability sounds more prudent to me.

Windows 7, and the x64 variant in particular, is very stable. Clearly, you have something that is fundamentally upsetting the balance.

Personally, I'd check your hardware, in terms of comparability, but also for faults. Download the latest stable drivers. Then reinstall Windows 7 (preferably x64), install your updated drivers, and install the bare essentials in terms of software, then back it up.

Run it for a few days, if all is well, install a few more apps... but be careful what you install - most Windows stability issues related to poorly-coded drivers, but occasionally there are certain windows updates that cause problems.

Failing this, as an apparent *nix fan, why don't you consider Linux + Mono?

CJM
  • 2,627
22

It's "kind of" possible; see Native shell.

enter image description here

user541686
  • 23,629
18

The Windows 3.1, 95 and 98 GUIs ran as a separate layer on top of the DOS OS. With the advent of NT based architecture (NT4, 2000, XP) the GUI is now the OS, while "DOS" is now an application. Other than troubleshooting CLI, it is not possible to run the newer OSs without GUI.

John
  • 305
8

Microsoft has announced Windows Nano Server for the next version of Windows Server (Windows 10 based):

Nano Server is a deeply refactored version of Windows Server with a small footprint and remotely managed installation, optimized for the cloud and a DevOps workflow. [...] available in the next version of Windows Server, Nano Server focuses on two scenarios:

  1. Born-in-the-cloud applications – support for multiple programming languages and runtimes. (e.g. C#, Java, Node.js, Python, etc.) running in containers, virtual machines, or on physical servers.
  2. Microsoft Cloud Platform infrastructure – support for compute clusters running Hyper-V and storage clusters running Scale-out File Server.

There won't be GUI in Windows Nano Server:

[...], we removed the GUI stack, 32 bit support (WOW64), MSI and a number of default Server Core components. There is no local logon or Remote Desktop support. All management is performed remotely via WMI and PowerShell. [...]

superbob
  • 189
3

Enable Emergency Management Services , if your system has a serial port.

The EMS "Special Administration Console" gives you a cmd.exe prompt (after you open a "channel") that you can use to perform tasks. The console even continues to function if the system bluescreens, allowing you to view the crash data or reboot.

AminM
  • 520
LawrenceC
  • 75,182
2

The Session Manager determines what sessions to run by evaluating

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems

for required and optional subsystems.

Windows, for example, is a subsystem that is ran and is listed as

%SystemRoot%\system32\csrss.exe

with various parameters passed along. This is the Client-Server Runtime Server Subsystem and will start a graphical interface. When trying the following out which you shouldn't try at home

%SystemRoot%\system32\cmd.exe

we get to see something along the lines of

C000021a (fatal system error)

The session manager initialization system process terminated unexpectedly
with a status of Ox00000000. (Ox00000000 Ox00000000)

The system has been shut down.

which basically means that cmd.exe gracefully exits because it's window can't be made. I think however that a program that initializes a DOS mode, prints something on the screen and loops would have success. This is basically something that chkdsk does when running during the boot and it wouldn't be hard to replicate something along that lines in C++. It however takes quite some time to replicate a full console, unless there are good open source alternatives out there where it is a matter of rewriting the I/O...

So, it is technically possible to write software that allows you to run command line only and switch to a command line session, but I see this as a hard workaround for what you are trying to achieve. Because you should rather figure out why everything hangs and why you can't simply press CTRL+SHIFT+ESC to launch your task manager and kill it with fire...

Look into capturing a trace and forcing a dump if you want to solve the freeze instead. :)

1

You can install Windows Server 2008 R2 in a "Core" configuration that has no gui.

Joel Coehoorn
  • 28,637
0

if you are looking for a small footprint windows install with only command prompt, you can look at windows PE. I believe they are on version 5, and this can be obtained for free from M$. I am sure most of the "gui" is still running in the background, but you can decide how it will be built, you can choose drivers, win applications like powershell, or dot.net, other applications like A/V, Imaging tools, etc.

This environment is supposed to be for deployment / recovery of computers, but you know the M$ community and some techs have even created a GUI...

ben w
  • 1
-1

Another way is to use the pre-os environment. If you ever tried aomei partition manager you will notice it reboots and run a command in a strict shell in non gui environment. But I don't know yet how to do it.

Zibri
  • 291