Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.)

share|improve this question
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 6:46

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
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 6:48
    
I've just learned that man isn't limited to commands :) –  user25656 Aug 22 '13 at 6:50
    
@gertvdijk, I won't edit those files. In general, I stay away from fiddling with system files. –  user25656 Aug 22 '13 at 6:51
1  
@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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.