I use emacs a lot, sometimes I work on another machine though ssh to edit file. In emacs, you can use TRAMP to do EVERYTHING in remote machine.
Syntax
|
|
- protocol : ssh, scp, ftp and even docker
- user : username to remote in remote machine
- remote_address : it can be ip address or domain name of remote address
- port : port of protocol
Example
|
|
When the connection is established, emacs will open a dired - emacs’s file manager for you to interact with remote machine. You can edit file and save, you can open terminal, you can copy file from local machine to remote machine and vice versa.
If you haven’t use this before, don’t worry, just remember some following keys to use:
- enter or f : enter directory or open file
- D : delete
- C : copy
- R : move
- d : change state to delete
- m : mark
- u : unmark
- U : unmark all
- x : execute
- ^ : back to parent directory
To open terminal, just call “shell” command1M-x shell