# head -n 1 /COPYRIGHT



## balanga (May 3, 2021)

Try running the thread title on your installation of FreeBSD.


----------



## ralphbsz (May 3, 2021)

Yes? It tells me what version I'm running?


----------



## balanga (May 3, 2021)

Depends on which version you are running...


----------



## im (May 3, 2021)

Your method displays nothing about architecture (i386/amd64/other).
It is possible to run different versions FreeBSD-kernel and FreeBSD-world with different architectures, for example i386 world on amd64 kernel.
Sometimes it is a machines which are not finished uprgade, or especially builded custom systems, or legacy of FreeBSD-jails.

Looking at the 1st line of /COPYRIGHT it is not the best way to discover your FreeBSD-version.
I prefer to check a set of binaries with file(1) command. It gives more exactly info combined with `uname -a` command.

Example from the one of the same machine (11.4 kernel with 8.3 world):
`# head -n 1 /COPYRIGHT`

```
# $FreeBSD: [B]releng/8.3[/B]/COPYRIGHT 231480 2012-02-10 23:49:04Z tuexen $
```
`# uname -a`

```
FreeBSD dbm.com 11.4-RELEASE-p3 FreeBSD 11.4-RELEASE-p3 #0: Tue Sep  1 08:22:33 UTC 2020     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
```

`# file /bin/sh`

```
/bin/sh: ELF [B]32-bit[/B] LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), [B]for FreeBSD 8.3[/B], stripped
```
Another machine with some jails with completely different versions of jails 8.3-10.1-10.3 on 10.3 kernel:
`# file /bin/sh /home/jails/*/bin/sh`

```
/bin/sh:                   ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, stripped
/home/jails/mail/bin/sh:   ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 8.3, stripped
/home/jails/mo/bin/sh:   ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, stripped
/home/jails/vh/bin/sh:    ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.1, stripped
/home/jails/wwwold/bin/sh: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 8.3, stripped
```
`# uname -a`

```
FreeBSD s.com 10.3-RELEASE-p18 FreeBSD 10.3-RELEASE-p18 #0: Tue Apr 11 10:13:20 UTC 2017     [EMAIL]root@amd64-builder.daemonology.net[/EMAIL]:/usr/obj/usr/src/sys/GENERIC  i386
```


----------



## SirDice (May 3, 2021)

```
dice@chibacity:~/test % head -n1 /COPYRIGHT
#       @(#)COPYRIGHT   8.2 (Berkeley) 3/21/94
dice@chibacity:~/test % freebsd-version
13.0-RELEASE
```
The $Id line is removed nowadays.


----------



## balanga (May 3, 2021)

SirDice said:


> ```
> dice@chibacity:~/test % head -n1 /COPYRIGHT
> #       @(#)COPYRIGHT   8.2 (Berkeley) 3/21/94
> dice@chibacity:~/test % freebsd-version
> ...


 Why was it removed? I thought maybe someone had overlooked it. Sometimes when looking at a filesystem it's useful to know what files you have archived. I'm not aware of anything specific which displays the version. I notice I have a /etc/os-release but that seems to be something generated at boot time.


----------



## SirDice (May 3, 2021)

balanga said:


> Why was it removed?


Because those $Id strings don't work with git.


balanga said:


> I notice I have a /etc/os-release but that seems to be something generated at boot time.


That's a fairly recent addition, it could be installed as a port (sysutils/etc_os-release) on older versions and became part of the base OS with 13.0. 





__





						Creating /etc/os-release
					





					lists.freebsd.org


----------

