SHOWCONSOLE(8)

πŸ“¦ version 2.45, in opensuse-leap 16.0

πŸ’… SHOWCONSOLE(8) β€” the SUSE boot concept, bestie edition ✨

Okay so this is showconsole(8), straight out of the SUSE boot concept, and honestly? It's lowkey a lifesaver. Let's get into it. 🫢


🌸 NAME 🌸

  • Showconsole β€” literally just figures out the real tty of stdin, no cap.
  • Setconsole β€” redirects system console output to a tty. Iconic behaviour.

⭐ SYNOPSIS ⭐

showconsole [-n]

setconsole [-r|/dev/tty<xy>]

That's it. That's the whole vibe check. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

So showconsole does the thing where it determines the real character device of the current system console. Why do you care? Because you can run it on /dev/console as the current character device and get the actual real character device back. It's giving detective energy. πŸ”βœ¨

Then there's setconsole β€” give it a terminal device as an argument and it redirects the output that would have gone to /dev/console or /dev/tty0 over to the terminal you picked. Slay.

And if you pass no argument at all, or use the option? setconsole undoes any redirection. Back to default, no drama. πŸ’…


✨ OPTIONS ✨

  • -n β€” returns the major and minor device numbers instead of the device file name. Super useful because you can ask the kernel for the major and minor device numbers of a device file that doesn't even exist in /dev yet. Not me using this to peek at devices that aren't born yet πŸ˜­πŸ‘‘

πŸ’€ BUGS πŸ’€

Real talk, there are some things you gotta know:

showconsole needs a mounted /proc file system, okay? Non-negotiable.

It also tries to set the controlling tty to stdin if no controlling tty is found. And after reading /proc, it restores the status of the controlling tty β€” specifically to avoid problems with getty processes. Considerate queen behaviour honestly. πŸ‘‘


πŸŽ€ FILES πŸŽ€

  • /proc/<pid of showconsole>/stat β€” the stat file of the showconsole process. Like its little birth certificate.
  • /dev/console β€” the system console. The main character, fr fr. 🌈

πŸ¦‹ SEE ALSO πŸ¦‹

blogd(8), console(4), tty(4), proc(5). Go read those next, bestie, iykyk. πŸ“š


2000 Werner Fink, 2000 SuSE GmbH Nuernberg, Germany.


πŸ’œ AUTHOR πŸ’œ

Werner Fink <werner@suse.de> β€” thank you for your service, king πŸ«‘πŸ’–


Okay that's the whole page! And before I go β€” this lil masterpiece comes to you from the 3rd Berkeley Distribution, dated Jan 14, 2016, and it's the SHOWCONSOLE(8) page. Obsessed with her, honestly. Periodt. πŸŽ€βœ¨πŸŒΈ

πŸ“¦ where this page comes from