0

I was reading the man page for firewalld.service and I wanted to open up the service.xml from within the man page (which I believe is less).

I know :e would do the job if I had permissions, but instead I had to drop out of the man page, and use sudo less .../service.xml

How do I avoid this in the future?

AncientSwordRage
  • 2,365
  • 5
  • 22
  • 34

1 Answers1

2

You can run an arbitrary command in man/less with an exclamation mark ("!").

Type

!sudo less .../service.xml

and press Enter to open a new less session as root within your unprivileged man or less.

Deltik
  • 19,353
  • 17
  • 73
  • 114