Weird issue with escape characters in Ubuntu Server

mgomez

New Member
Joined
Jul 2, 2026
Messages
2
Reaction score
0
Credits
20
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.
 


Follow Linux.org

Members online


Latest posts

Top