Friday, May 3, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 36094  / 2 Years ago, wed, november 2, 2022, 3:40:20

I guess my question is closer to "How would I go about editing a .conf file from a remote connection via an ssh terminal?"



I downloaded an ssh emulator to my iPhone which works fine and dandy, and I can ssh to my computer at home via DNS services. Right now I'm trying to annoy my room mates who are home right now my getting my machine to beep.



In order to do that I need to edit /etc/modprobe.d/blacklist.config. I tried sudoedit but I got no text.



Anything graphical is out of the question, because I'm essentially in a dedicated terminal like if you pressed Ctrl+alt+F1.


More From » command-line

 Answers
3

On the command line (over ssh or without X) to edit a config file I suggest:



sudo -e /path/to/config_file


By default sudo (root) uses vi as an editor. Personally I prefer vim



sudo apt-get install vim-full


To change your editor, run



sudo update-alternatives --config editor


You will see something like this:



There are 3 choices for the alternative editor (providing /usr/bin/editor).

Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/nano 40 manual mode
2 /usr/bin/vim.basic 30 manual mode
3 /usr/bin/vim.tiny 10 manual mode


hit the number key to change your preferred


[#26363] Thursday, November 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ndeecru

Total Points: 109
Total Questions: 128
Total Answers: 117

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
;