Skip to content

How to use sudo nano <file> in MacOS using SSH? #5177

Closed Answered by lostage
Taewan-P asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, so yes, coping the ~/.terminfo folder to /root/.terminfo seems to have done the trick. Probably not the right way to do that? I'm open to the right way ;)

I'm on AlmaLinux and running the tic -D showed:

$ tic -D
/home/lostage/.terminfo
tic: /usr/share/terminfo (no permission)

$ sudo tic -D
/usr/share/terminfo

I wasn't sure how to run the original command to get the terminfo under root, but doing the copy seems to have worked. Now I get:

$ sudo tic -D
/usr/share/terminfo
/root/.terminfo

And sudo nano <file> works as expected!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lostage
Comment options

@rhodes-b
Comment options

@lostage
Comment options

Answer selected by Taewan-P
@Taewan-P
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants