Skip to content

Instantly share code, notes, and snippets.

@ebta
Created February 21, 2023 08:02
Show Gist options
  • Save ebta/94bd47a2aeb43f25f573927a14d2b8e4 to your computer and use it in GitHub Desktop.
Save ebta/94bd47a2aeb43f25f573927a14d2b8e4 to your computer and use it in GitHub Desktop.
Linux display or change a pre-login message /etc/issue file

The /etc/issue file escape code

The issue-file (/etc/issue or the file set with the -f option) may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash () immediately followed by one of the letters explained below.

\b : Insert the baudrate of the current line.
\d : Insert the current date.
\s : Insert the system name, the name of the operating system.
\l : Insert the name of the current tty line.
\m : Insert the architecture identifier of the machine, eg. i486
\n : Insert the nodename of the machine, also known as the hostname.
\o : Insert the domainname of the machine.
\r : Insert the release number of the OS, eg. 1.1.9.
\t : Insert the current time.
\u : Insert the number of current users logged in.
\U : Insert the string “1 user” or “ users” where is the number of current users logged in.
\v : Insert the version of the OS, eg. the build-date etc.

Default /etc/issue file

We can display /etc/issue using the less command/more command/most command or cat command or bat command:

bat /etc/issue
more /etc/issues
cat /etc/issue

Source: Linux display or change a pre-login message /etc/issue file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment