Difference between revisions of "Editing Config Files"

From "PTTLink Wiki"
Jump to navigation Jump to search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
* [http://www.lagmonster.org/docs/vi.html vi] is pretty much the default editor on most Linux distros. Learn it, love it.
 
* [http://www.lagmonster.org/docs/vi.html vi] is pretty much the default editor on most Linux distros. Learn it, love it.
 
* [https://www.vim.org/ vim] is an improved version of vi with plugin support and many more features. To install:
 
* [https://www.vim.org/ vim] is an improved version of vi with plugin support and many more features. To install:
: <code>apt-get -y install vim</code>
+
<syntaxhighlight lang="text">apt-get -y install vim</syntaxhighlight>
 
* [https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ nano] is easier to learn and preferred by many.
 
* [https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ nano] is easier to learn and preferred by many.
  
Line 13: Line 13:
 
Many folks prefer a GUI editor and file transfer client over the Linux vi and nano editors. If you need to do a lot of copy and paste these are much easier. Here are some of the many clients out there.  
 
Many folks prefer a GUI editor and file transfer client over the Linux vi and nano editors. If you need to do a lot of copy and paste these are much easier. Here are some of the many clients out there.  
  
For Windows:
+
==For Linux==
 +
* Most Linux distributions that have a Desktop (GUI) installed will have a text editor that is fully capable of properly editing files. 
 +
 
 +
==For Windows==
 
* [https://winscp.net/ WinSCP] is a popular file transfer and editor client. See [https://community.allstarlink.org/t/help-winscp-permission-denied-error-code-3-error-message-from-server-permission-denied/16267/4?u=wd6awp | Using WinSCP] Topic on Community.
 
* [https://winscp.net/ WinSCP] is a popular file transfer and editor client. See [https://community.allstarlink.org/t/help-winscp-permission-denied-error-code-3-error-message-from-server-permission-denied/16267/4?u=wd6awp | Using WinSCP] Topic on Community.
 
* [http://www.putty.org Putty] is not an editor but you'll need it. It is '''the''' SSH and Telnet client.  
 
* [http://www.putty.org Putty] is not an editor but you'll need it. It is '''the''' SSH and Telnet client.  
  
For Mac:
+
==For Mac==
 
* [https://panic.com/transmit/ Transmit] or [https://cyberduck.io CyberDuck] file transfer client.
 
* [https://panic.com/transmit/ Transmit] or [https://cyberduck.io CyberDuck] file transfer client.
 
* [https://macromates.com Text Mate] or [https://www.sublimetext.com Sublime] Editor.
 
* [https://macromates.com Text Mate] or [https://www.sublimetext.com Sublime] Editor.
Line 35: Line 38:
 
* [https://www.vim.org/download.php Vim] - Several versions are available including gVim for Windows.
 
* [https://www.vim.org/download.php Vim] - Several versions are available including gVim for Windows.
  
The programs listed above will with just fine with their 'internal' editors.  If you choose to use FileZilla or a similar FTP/SFTP client then it is recommended use you use one of the Windows Editors listed.   
+
If you choose to use FileZilla or a similar FTP/SFTP client then it is recommended use you use one of the Windows Editors listed.   
  
 
'''''Note:  Notepad included with Windows was updated in 2018 to handle LF/CRLF but your mileage may vary.'''''
 
'''''Note:  Notepad included with Windows was updated in 2018 to handle LF/CRLF but your mileage may vary.'''''

Latest revision as of 00:43, 6 February 2022

To modify your node beyond the basic settings of nodesetup.sh, you'll need to manually edit the config files. Of course, you'll need to know the user ID and password of your AllStarLink server. You also want to understand the Structure of Config Files before you start.

Linux CLI Editors

For quick and simple changes the built-in Linux editors are the way to go.

  • vi is pretty much the default editor on most Linux distros. Learn it, love it.
  • vim is an improved version of vi with plugin support and many more features. To install:
apt-get -y install vim
  • nano is easier to learn and preferred by many.

GUI Editors

Many folks prefer a GUI editor and file transfer client over the Linux vi and nano editors. If you need to do a lot of copy and paste these are much easier. Here are some of the many clients out there.

For Linux

  • Most Linux distributions that have a Desktop (GUI) installed will have a text editor that is fully capable of properly editing files.

For Windows

  • WinSCP is a popular file transfer and editor client. See | Using WinSCP Topic on Community.
  • Putty is not an editor but you'll need it. It is the SSH and Telnet client.

For Mac

Location of Config Files

Nearly all of the files you'll need to edit are in /etc/asterisk

Caveats

There are other FTP/SFTP capable programs with GUIs like FilZilla that do not have built in file editing. These will require you use/install a separate editor while using your favorite GUI FTP/SFTP client to transfer files.

Editing on Windows systems

Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. DOS uses carriage return and line feed ("\r\n") as a line ending, which Unix uses just line feed ("\n"). You need to be careful about transferring files between Windows machines and Unix machines to make sure the line endings are translated properly.

Several editors exist for Windows systems that can properly handle this LF/CRLF discrepancy:

  • Notepad++
  • Vim - Several versions are available including gVim for Windows.

If you choose to use FileZilla or a similar FTP/SFTP client then it is recommended use you use one of the Windows Editors listed.

Note: Notepad included with Windows was updated in 2018 to handle LF/CRLF but your mileage may vary.