How to get Manjaro version on neofetch?

>>> OS: Manjaro 21.2.1 Qonos
>>> OS: Manjaro Linux x86_64

neofetch cannot show the version and code of Manjaro, what can I do with this or it needs manjaro developers to support?

Wouldn’t that be a question to ask to GitHub - dylanaraps/neofetch: 🖼️ A command-line system information tool written in bash 3.2+ directly?

Found this here (
elif type -p lsb_release >/dev/null 2>&1; then
	# read distro_detect distro_release distro_codename <<< $(lsb_release -sirc)
	#IFS=" "
	#read -r -a distro_detect <<< "$(lsb_release -sirc)"
	#if [[ ${#distro_detect[@]} -eq 3 ]]; then
	#	distro_codename=${distro_detect[2]}
	#	distro_release=${distro_detect[1]}
	#	distro_detect=${distro_detect[0]}
	#	for i in "${!distro_detect[@]}"; do
	#		if [[ ${distro_detect[$i]} =~ ^[[:digit:]]+((.[[:digit:]]+|[[:digit:]]+|)+)$ ]]; then
	#			distro_release=${distro_detect[$i]}
	#			distro_codename=${distro_detect[*]:$((i+1))}
	#			distro_detect=${distro_detect[*]:0:${i}}
	#			break 1
	#		elif [[ ${distro_detect[$i]} =~ [Nn]/[Aa] || ${distro_detect[$i]} == "rolling" ]]; then
        #			distro_release=${distro_detect[$i]}
	#			distro_codename=${distro_detect[*]:$((i+1))}
	#			distro_detect=${distro_detect[*]:0:${i}}
	#			break 1
	#		fi
	#	done
	distro_detect="$(lsb_release -si)"
	distro_release="$(lsb_release -sr)"
	distro_codename="$(lsb_release -sc)"

So unless these guys change neofetch you basically can’t do that

Both neofetch and screenfetch are Bash scripts, and neither of them is being developed by the Manjaro developers. We source those packages from Arch, but I’m not sure whether that is also where they would be developed/maintained ─ other distributions carry them too.

The neofetch development appears to be hosted here. :arrow_down:

That said, the Manjaro 21.2.1 Qonos information in screenfetch comes from this command… :arrow_down:

lsb_release -sirc

Therefore, considering that neofetch is only a Bash script, it should be relatively easy to modify the command it uses for retrieving the distro information into the one above, which is what screenfetch uses.

1 Like

Okay, I’ve located the code segment. If you open up /usr/bin/neofetch in Kate and you have line numbers enabled, scroll down to line 991, where you will find the following code snippet… :arrow_down:

            elif type -p lsb_release >/dev/null; then
                case $distro_shorthand in
                    on)   lsb_flags=-si ;;
                    tiny) lsb_flags=-si ;;
                    *)    lsb_flags=-sd ;;
                distro=$(lsb_release "$lsb_flags")

Change line 995 from… :arrow_down:

                   *)    lsb_flags=-sd ;;

… into… :arrow_down:

                   *)    lsb_flags=-sirc ;;

… and save the file. You will be prompted for the administrator password when saving it.

And here you go… :arrow_down:

However, do bear in mind that this change will become undone again upon the next update to neofetch, so if you really want this to be standard in all future neofetch releases, then I’m afraid you’re going to have to file a feature request with its developers at… :arrow_down:

I shall now hereby claim the solution to this issue and declare myself brilliant. :laughing: :joy: :rofl:

And always remember that…




Worked like a charm, thanks.

1 Like

Thanks! I was thought of Manjaro Team does not provide it to neofetch.

Apart from (I don’t know why) there is no space between Manjaro and Linux in lsb_release -sirc, it is perfect

I have opened the issue


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.