# Ubuntu – Does Ubuntu follow the Linux Standard Base (LSB)

lsb-release

I was reading about the Linux Standard Base and was wondering if the structure used in Ubuntu is the same that is suggested in the LSB. I know some distros do not follow or do some changes to the LSB, so I also want to know if Ubuntu has some changes, and what changes these are.

• For 11.10 and 12.04 the Linux Standard base version is 4.0, as noted on Launchpad. As explained at the Linux Foundation, LSB is

a core standard for the Linux operating system that encourages interoperability between applications and the platform. It includes a written binary interface specification, a set of test suites for both distributions and applications writing to the standard, and a sample implementation for testing purposes.

The LSB specification outlines standards for many things such as the filesystem, core libraries and key functions such as libc system calls. It also specifies software packaging standards and that a distribution must support the rpm standard even if its default package system does not use the rpm system.

The specification also contains the standard for runlevels and init scripts, and a related package included in Ubuntu is lsb-base. This package, according to its own description, contains the

init-functions shell library, which may be used by other packages' initialization scripts for console logging and other purposes.

The easiest way to demonstrate Ubuntu support for these init standards is to run

grep -ri "BEGIN INIT INFO" /etc/init.d


and then examine one of the files listed. Sudo, for example, will have the LSB header specifications at the start of the script:

### BEGIN INIT INFO
# Provides:          sudo
# Required-Start:    $local_fs$remote_fs
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Provide limited super user privileges to specific users
# Description: Provide limited super user privileges to specific users.
### END INIT INFO


The directories such as \$local_fs that are mentioned by these LSB headers are listed in /etc/insserv.conf. For more information on init, see page 168 of this Ubuntu book

It is difficult to find the specific areas in which Ubuntu diverges from the LSB standards, and the disclaimer on the LSB packages is that the existence of those packages does

not imply that Debian fully complies with the Linux Standard Base, and should not be construed as a statement that Debian is LSB-compliant.

In general, however, both Ubuntu and Debian do intend to be compliant and they include the command lsb_release to indicate the distributions' general compliance. However, they will make occasional divergences when necessary, with relation to such things as the filesystem hierarchy, as noted in the answers here: