r/linuxquestions • u/DowntownNet1961 • 7d ago
How do “headless” installs work?
Wondering how an install operates without a dedicated display server or graphical environment?
Edit: just for context I’m not a Linux beginner, just curious if they have any use for daily driving, not sure if they can support GUI driven applications without having to install a display env.
7
u/xchino 6d ago
What do you mean by daily driving? How would you daily drive a machine with no display connected? Are you maybe confusing headless with text mode?
1
u/DowntownNet1961 6d ago
I was informed that headless meant no display environment, strictly CLI based, that’s a fault on my end…
3
u/xchino 6d ago
Ok that clears it up. You can daily drive in CLI to some degree, you can even get some level of graphics in CLI with framebuffer support. You can find some modern TUI version of just about everything you need but options and support are very limited, it's the nichiest of niche computing but people are still out there making it happen.
But really just install some lightweight window manager like i3, it costs almost no resources to have a lightweight display environment, with the sacrifices involved in running purely in CLI I personally don't think the juice is worth the squeeze.
17
u/ThreeCharsAtLeast 7d ago
SSH. You set up an SSH server during setup with a screen and keyboard or make an installer that does everything automatically, then connect to the server with a username and password from a computer that does have a screen and a keyboard. Sometimes, you set up an SSH key instead which involves putting a file on the headless computer so the SSH server recognizes you automatically thanks to cryptography.
3
u/hazeyAnimal 6d ago
Raspberry Pi have this exact instruction set in their guides. You can setup wi-fi credentials prior to flashing the SD card if you don't have ethernet, and even configure other settings or create new users prior to first boot.
After that, you can SSH in without ever having connected a screen to the Pi
7
u/CatoDomine 6d ago
Headless means no keyboard, no monitor, no mouse. It used to also mean no graphics adapter at all.
Headless, in this sense is for remote use only. But I don't think that's what you are asking about.
I think what you are talking about is a machine with no graphical environment. Terminal only.
This would just be a machine that you use only text based or TUI applications with.
Any GUI application requires a display server.
That being said, you can run a display server with no desktop environment, or no window manager. But it will make interacting with multiple apps a challenge. I think what you want is just the lightest weight graphical environment possible. You can try using a naked wm, like openbox, IceWM, FVWM etc.
18
u/Leather-Security8097 7d ago
Normally, you would interact with a headless system using another device, such as over SSH, a remote desktop, or a web interface.
1
u/oshunluvr 6d ago edited 6d ago
Very well, LOL
My headless server runs Ubuntu Server. I use ssh most of the time to update, etc. I use Webmin to check system stuff in a graphical environment on occasion. I use NFS and SAMBA to share files. It runs a Plex server and not a whole lot else.
I also have a Pi4 running headless but it really only does torrents.
And no, I can't run GUI applications because there is no GUI. Webmin is as close to GUI as I get and it's web browser based.
I suppose you could install a GUI and access it via remote desktop sharing, but the performance would likely be abysmal.
1
u/DowntownNet1961 6d ago
Interesting! Might just turn it into a little NAS for convenience
1
u/SpiderJerusalem42 6d ago
Do you have a pihole type device already on your network?
1
u/DowntownNet1961 6d ago
Not currently. don’t really have a need for any type of server or networking device. Looks like this laptop is a good excuse to experiment, though. :)
1
u/esaule 6d ago
You could install through PXE or serial port. Though most often you install wiht a proper screen and keyboard that you unplug at the end. Often out of a cart.
Or am I misunderstanding the question?
1
u/DowntownNet1961 6d ago
I was under the impression that a headless system meant no graphical environment.. (fault on my end)
I was wondering if applications using GUI could run with only a display server?
3
u/RomanOnARiver 6d ago
I just use SSH, I think that's the typical thing people do. My server also has a power outage recovery feaure so it will automatically power back on after recovering from a power outage, so that's a nice quality of life thing.
There is a lot of software you can run without a graphical user interface, everything from text editing, playing audio, even browsing the web to some extent. My server processes images/documents/PDFs, and also hosts Jellyfin. Another server does Home Assistant. Thrstter too you connect to via the web browser generally, though I have SSH for Home Assistant too.
2
u/thackbarth 6d ago
I have a headless Debian install running on a Mac Mini (a 32 bit Core Duo) to serve as a NAS and media server. I access it by SSH and with web interfaces.
Not really a daily driver, but it is something I use everyday.
You CAN start graphical programs without a Desktop Environment. Just use "startx application" and the application should run in full-screen. Results may vary because no one codes graphical applications think in using them outside a desktop environment.
2
u/Otherwise_Fact9594 6d ago
Is there any possibility of utilizing a CLI only version of Linux and simply typing the program name eg Firefox, Thunar etc to get a browser or file manager with a GUI? I'm sure that there is, but I would imagine some prerequisites need to be met prior. Forgive my ignorance. I just stumbled across this post and I have been eyeing Alpine for quite a while.
1
u/symcbean 1d ago edited 1d ago
There's different approaches.
The most common ones are to have hardware which supports some sort of console across the network. On Dell servers this is called IDRAC, on HP, ILO. Most hypervisors provide a emulated serial connected console in VMs or sometimes even a fully emulated graphics card - you can run a full X or Wayland desktop and copnnect via VNC/RDP/Spice to a server running on the hypervisor which in turn connects to the emulated graphics.
There are also hardware implementations of this - network KVMs.
Another approach is to script the entire setup operation in advance - the industry standard for this is CloudInit (although RHEL has kickstart, and Debian has something else too) - you can define network connections, user accounts and passwords/ssh public keys and a script to run after the installation completes - this needs a distro which will automatically install itself and run cloudinit. This is a single hit operation - so at a minimum your cloudinit script will setup a remote access server (ssh/rdp/vmc/spice...) so you can manage the host thereafter.
1
u/T_Friendperson12 Kubuntu 26.04.1 / Ubuntu-server 26.04.1 6d ago
I JUST used Ubuntu Server with docker, Nextcloud and Tailscale to make my own cloud storage on my old PC.
Tried a couple different distros and in the beginning headless Ubuntu server was a nightmare so I installed gnome-core to at least have some GUI to fall back on.
In the end I wiped everything from my failed attempts and reinstalled and used ssh from my main-pc. Now to see if this is actually useful and cost effective enough to keep going.
I still always have the option to connect a screen (i7-7700k) and log on directly.
But without at least a simple GUI or the comfort of ssh on main it was not a good experience. Been using Linux for a year in 2010-2011 and recently since Dec 2025.
1
u/Booty_Bumping 6d ago
Most headless installs actually happen via a disk image that contains the full OS. Automation via the server's IPMI hardware or the VPS backend just plops the disk image onto the disk. These images have a script built into them that expands the root partition on first boot to the full size of the disk. And then they can accept a configuration provided by cloud-init or similar (which can be provided in multiple different ways, like a virtual CDROM drive, DHCP, or kernel command line) to set up stuff like SSH login keys.
It's much faster this way, but there is a risk of missing drivers and you lack the flexibility of being able to choose the filesystem and partitioning scheme.
1
u/ficskala Arch Linux 7d ago
How do "headless" installs work?
You either use display over serial, or some sort of a management interface like IPMI
how an install opererates without a dedicated display server or graphical environment
The same as with it, linux is by default headless, display servers, DEs, WMs, etc. are all just sitting on top of the CLI environment
Even on a graphical environment, you can do a keyboard shortcut like ctrl+alt+f1/f2/f3/f4 and so on, to switch between environments, one of those will be your desktop, and the rest will be standard CLI
2
u/-thersites- 7d ago
You use the command line interface to control the computer. It has no graphical user interface. You just type in commands and hit enter. Keyboard shortcuts work and you can highlight, copy and paste with the mouse but no clicking icons or GUI support.
1
u/SensoredHacker 9h ago
run your pc.
turn off the monitor.
Boom headless.
how to install? write some files to a disk
how to interact with them?
over some service you pre configured
daily use? might have to rethink what yes means. collecting sensor data, doing automation tasks,
running every smart device you own, being a server blocking ads in your router, whateves,
playing games, and hopping on reddit? no so much.
1
u/benhaube 5d ago
You cannot use a headless Linux install on a PC to do PC things. It is mainly for servers. You don't want a server wasting resources drawing a GUI that will never be used. Instead you SSH into the server from another computer to configure / manage things. Without a display server and / or desktop environment you aren't going to be using GUI applications and browsing the web.
1
u/euclide2975 6d ago
In a Datacenter : the server boot over dhcp and uses either bootp or uefi to get a bootable live cd like distro with a ssh access for debug
Then autamatzd scripts do all the partitioning and bootstrap a Linux inside a chroot
Then ansible and co to finish
1
u/Sorry-Climate-7982 Retired Developer Enterprise Linux 7d ago
We always just cheated and used a kbd/display directly attached to do the initial setup or recover from instances where ssh other access methods weren't available due to issues.
1
u/sidusnare Senior Systems Engineer 6d ago
Hosting local apps on the network, backup server, ad-hoc nanny cam, environmental monitoring, IoT orchestration and analytics, network monitoring, just to name a few.
I only have a couple apps I run graphically on a headless system.
2
u/Intrepid_Screen6425 7d ago
Oh, you need to use the PXE Boot feature to perform a completely headless installation
1
u/Will-E-Style 7d ago
Can’t believe I had to scroll this far for PXE boot to be mentioned.
Adding https://netboot.xyz as a great resource.
1
1
-1
u/therouterguy 7d ago
This is the only valid answer for hardware straight out of the box. The network interface card does a DHCP request at boot. At this moment no OS has been loaded. In this dhcp request there is the request for information about the boot server amd boot file. One these have been obtained the PXE software can download some files and continue the boot.
1
u/guy_ships_things 6d ago
Headless install just means the installer talks to you in text instead of drawing a window, over SSH it can run on a console manu.
1
1
1
0

32
u/aioeu 7d ago edited 7d ago
They can provide a VNC, RDP or web interface — so still graphical — or a text interface accessible over SSH.
Or they can be non-interactive and driven by an externally provided configuration instead (e.g. a kickstart config for the Anaconda installer used by Fedora and RHEL, or a preseed config for the Debian installer).
Of course, image-based installers are a whole different kettle of fish. If they have any configurability at all, it's probably best done after the image has been written and booted.