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

This question already has an answer here:

I want to resize the terminal which comes up when you press CtrlAltF1 (or F2,F3,...). 25x80 is small for a 24" screen.

Tried using stty, but the commands stty columns 200 and stty rows 50 does not work directly. Am I missing something OR is this a wrong approach.

Ideally looking for a generalized solution, but would be content with something that works in RHEL5 and Ubuntu. It would be better if its possible using some commands which I can put in a script file rather than changing some boot-level stuff.

share|improve this question

marked as duplicate by jasonwryan, Anthon, slm, Gilles, Evan Teitelman Aug 17 '13 at 3:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

@jasonwryan, I checked that solution, but it involves modification of grub.conf. As I mentioned, I would prefer something which does not involve tinkering with boot-time files. – BiGYaN Aug 16 '13 at 8:36
You can change the size of the font without touching grub's config... – jasonwryan Aug 16 '13 at 8:56
yes, you probably can—but that other answer doesn't tell you how, and that's what I was looking for, too. I don't mind my console coming up with a tiny font most of the time, but right now, I want it bigger! – Auspex Apr 7 '15 at 0:28

There are two major types of glass console on Linux: graphical and text modes.

You get graphical consoles if your video subsystem is supported by the Linux kernel directly, and you have enabled this / have not disabled this (depends on the distribution). If there's a driver, your screen will be autodetected and you'll get (by default) 9×16 pixel text at its native resolution. Then you'll have the opposite problem: tiny text. If CONFIG_FONTS and CONFIG_FONTS_* is enabled in the kernel, you can change the boot-time font to something larger, or you can just load a larger font after the system boots. There are two ways to change the resolution itself if it fails to autodetect:

  • The ‘gods, I feel so old’ way, with the kernel command line argument vga=, as detailed in this forum post. You'd need to reconfigure your boot loader for this, of course. The vga= option can get you both text (modes < 256) and VESA-compatible graphics modes (modes ≥ 256). The latter will be graphical but unaccelerated, so scrolling a very large framebuffer may look interesting, for slow values of ‘interesting’.
  • The new way, using Kernel Mode Setting. If you learn one of these, learn this one unless you're doing a lot of embedded or retro work. The vga= method may go away at some point.

If your video card isn't supported, its driver isn't loaded, etc, you'll find yourself with a text mode console. Text mode consoles are limited by the range of text modes of your graphics card. 80×25, 80×43 and 80×50 are the standard VGA ones. The original non-IBM VGA and SVGA cards always had nice additional text modes, but modern cards generally don't (‘who'd ever want text?’). There's a solution here: you can manipulate the VGA registers directly to reprogram the CRTC part of the chip to get higher resolutions. A 90s program called SVGATextMode could do this for you without kernel reconfiguration. It was a tiny bit like xrandr, but for text consoles, and may still work for you. I loved it: I could get something bizarre like 100×37 on my crappy 14" CRT. It made it decent for development back in 1994. To set a mode at boot time, your only recourse is to use vga= and use a VESA mode.

About the stty command: it tells the kernel about your terminal, but can't change the terminal itself. stty rows 200 will tell the kernel your remotely attached glass terminal has 200 lines per screen. Why this is the case is explained in the answers to this question.

share|improve this answer

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