0

I know Nano saves the files in the current directory by default. I know we can also specify the path we wanna save our file in.

What I wanna know is that can we select a save location in which nano saves all files by default? Instead of specifying the path each time?

Is there like a config file for nano we can edit?

2
  • info nano will provide some details of nano's nanorc files; sorry I don't use it & that was the result of a 1 second info nano command; did you try and look (it is the 8th select-able option in the help/info page for my release of Lubuntu)?
    – guiverc
    Oct 8 '20 at 5:12
  • You can set an operating directory (set operatingdir /path/to/dir) in the nanorc file - not sure if that's what you're looking for (it will change the location for opening files as well as for saving them). See man nanorc or info nanorc. Oct 8 '20 at 12:27
1

When you are inside the nano editor, pres Crtl+O (Oh not zero) and it will promt you
File name to Write: /youcantypepath/filenamekeeporchange
In fact if your terminal is expanded enough these shortcuts are always set as promts at the foot of the editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.