Solved Weird issue with escape characters in Ubuntu Server

Solved issue

mgomez

New Member
Joined
Jul 2, 2026
Messages
3
Reaction score
2
Credits
27
Hello. I recently installed ubuntu server and after installing a few things I looked through the manpages of a few commands and noticed they got jumbled up with what looks like escape sequences. They're showing up with things like "1m" and "0m". I think it bears mentioning that I am using the Fish shell but it does the same thing with Bash.

Does anyone have a clue what's going on? I attached an image to better illustrate what I mean.
Screenshot_20260702_160022.png
 


Hello. I recently installed ubuntu server and after installing a few things I looked through the manpages of a few commands and noticed they got jumbled up with what looks like escape sequences. They're showing up with things like "1m" and "0m". I think it bears mentioning that I am using the Fish shell but it does the same thing with Bash.

Does anyone have a clue what's going on? attached an image to better illustrate what I mean.
Welcome.

A likely disturbance, in the first instance, could be from the terminal failing to interpret the escape sequences, or the pager not handling them.

To see which terminal is being used:
Code:
echo $TERM
To see which pager is default:
Code:
ls -al /etc/alternatives/pager

One could try a different terminal and/or a different pager.
 
Welcome.

A likely disturbance, in the first instance, could be from the terminal failing to interpret the escape sequences, or the pager not handling them.

To see which terminal is being used:
Code:
echo $TERM
To see which pager is default:
Code:
ls -al /etc/alternatives/pager

One could try a different terminal and/or a different pager.
Hey! Thanks for getting back to me.

Output of echo $TERM is:

Code:
xterm-256color

And output of ls -al /etc/alternatives/pager is:

Code:
 root 20 Apr 18:22  /etc/alternatives/pager -> /usr/bin/less

I tried other terminals but still encounter the same issue.
 
Hey! Thanks for getting back to me.

Output of echo $TERM is:

Code:
xterm-256color

And output of ls -al /etc/alternatives/pager is:

Code:
 root 20 Apr 18:22  /etc/alternatives/pager -> /usr/bin/less

I tried other terminals but still encounter the same issue.
Okay. Did you try altering the pager? For example, selecting "more" as could done below, as root:
Code:
[root@min ~]# update-alternatives --config pager 
There are 3 choices for the alternative pager (providing /usr/bin/pager).

  Selection    Path            Priority   Status
------------------------------------------------------------
* 0            /usr/bin/less    77        auto mode
  1            /bin/more        50        manual mode
  2            /usr/bin/less    77        manual mode
  3            /usr/bin/w3m     25        manual mode

Press <enter> to keep the current choice[*], or type selection number:

Another alternative is to set the MANPAGER, or the PAGER environment variable in ~/$USER/.bashrc, then log out and in or source the .bashrc file:
Code:
export MANPAGER="more"
or
Code:
export PAGER="more"
Either of those variables can also be set system-wide if set in /etc/environment, then log out and in.
If one doesn't work, perhaps try the other. If none works, then at least the problem looks like it lies elsewhere. It's a bit laborious trying different things, but at least it excludes some things.

There are a number of pagers available which may need to be installed before being set. One of those is: most, but there are others one can research.
 
I am so sorry for wasting all of your time! I found out what the problem is after @osprey suggested exporting MANPAGER to bashrc!

I had some weird setting for my MANPAGER set at ~/.config/config.fish and when I took it out everything was fine.
 
@mgomez welcome to linux.org

When you are sure this is solved, you can mark it as such by going to your first post, and do as follows

Near bottom left of the post click Edit - (No Prefix) - Solved




1781766133855.png




Cheers

Wizard
 


Follow Linux.org

Staff online

Members online


Top