怎样将man的环境切换成less
Tofloor
poster avatar
myearn
deepin
2016-03-06 23:40
Author
感觉deepin的man默认环境是more,使用起来很不方便,希望切换成less

大多数linux发行版man手册的默认环境都是less,less功能比起more功能太多了,比如查找,向前翻页


目前我的方法是使用管道符
  1. man du | less
Copy the Code
但每次输入结束后还要输入 |less很不方便,只知道alias设置别名替换,但给后面添加命令就不知道怎么办了.
Reply Favorite View the author
All Replies
avatar
MattD
deepin
2016-03-07 02:02
#1
先看一下你的$PAGER变量是什么,man会调用它来分页:
  1. echo $PAGER
Copy the Code

而且man pages默认应该就是用less分页的啊。
Reply View the author
avatar
myearn
deepin
2016-03-07 05:31
#2
https://bbs.deepin.org/post/37795
先看一下你的$PAGER变量是什么,man会调用它来分页:

而且man pages默认应该就是用less分页的啊。 ...

弄好啦
thanks
Reply View the author
avatar
lifc0
deepin
2016-03-24 18:32
#3
安装15.1.1的32位、64位版本都遇到这个问题,建议官方做出修改。可sudo成root,执行以下命令在/etc/profile.d创建pager.sh暂时解决:
  1. echo PAGER=/bin/less > /etc/profile.d/pager.sh
Copy the Code



Reply View the author
avatar
u855697021
deepin
2016-03-24 23:08
#4
man默认就是less吧?至少15以后就是less...
Reply View the author