8

cat /etc/issue shows me

Ubuntu 13.04 \n \l

but I'm on Lubuntu 13.04. What is the purpose of /etc/issue? Also, what does \n \l in the output mean?

There's also issue.net which has just Ubuntu 13.04.

(I know that echo $DESKTOP_SESSION gives me Lubuntu.)

  • 3
    Note that Lubuntu is just Ubuntu with a different set of preselected packages. You can have Ubuntu, Kubuntu, Lubuntu and Xubuntu all installed at the same time. This makes it impossible to denote a single flavour in there. And $DESKTOP_SESSION is an environment variable that only works from within the desktop session. – gertvdijk Aug 22 '13 at 06:46

1 Answers1

7

See the man page for issue:

The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences, if supported by the getty-type program employed on the system.

So the following mingetty sequences can be used...

Tag Description

\d  insert current day (localtime),
\l  insert line on which mingetty is running,
\m  inserts machine architecture (uname -m),
\n  inserts machine’s network node hostname (uname -n),
\o  inserts domain name,
\r  inserts operating system release (uname -r),
\t  insert current time (localtime),
\s  inserts operating system name,
\u  The current number of users which are currently logged in
\U  Same as \u but inserts "n users"
\v  Inserts operating system version (uname -v). 

As far as /etc/issue goes and it showing Ubuntu: the file is not related to the desktop session and it is a text file you can manually change with vi or nano.

Could be considered a bug if you did not change it yourself but it could also be considered a user file that should be left to the user to change.

catch23
  • 1,254
  • 9
  • 31
  • 42
Rinzwind
  • 299,756
  • 4
    /etc/lsb-release will just list Ubuntu on any flavour too, by the way, for the same reason as described in my other comment. I would also recommend against manually editing /etc/issue. Some scripts really depend on the specific contents. If you would edit it to Lubuntu several scripts checking for the OS will fail. – gertvdijk Aug 22 '13 at 06:48
  • I've just learned that man isn't limited to commands :) –  Aug 22 '13 at 06:50
  • @gertvdijk, I won't edit those files. In general, I stay away from fiddling with system files. –  Aug 22 '13 at 06:51
  • 2
    @gertvdijk /etc/issue is -not- a system file. It is used to create a personal login text. If present it will never be overwritten. – Rinzwind Aug 22 '13 at 16:48
  • Where does uname get all that information from? Is it stored somewhere? – CMCDragonkai Jan 26 '16 at 04:39