User Tools

Site Tools


vps_-_plan9front_-_ed_network_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
vps_-_plan9front_-_ed_network_configuration [2022/07/19 19:30] – [rc: the Plan 9 shell] shrivervps_-_plan9front_-_ed_network_configuration [2022/07/19 20:40] (current) – removed hc9
Line 1: Line 1:
-====== rc, ed, network configuration ====== 
- 
-===== rc: the  Plan 9 shell ===== 
- 
-    * **ctl-h** is backspace, kind of; **ctl-u** erases the current line. As seen, with the VPS Plan 9 console prompt **ctl-h** backspace, the screen output may not be what one would expect<sup>1</sup>. 
-    * To detach the Plan 9 console prompt (%), while retaining the ability to reattach it __without__ rebooting your server, press **ctl-]** to close the prompt (%). Then, press '**q**' to disconnect the VPS Maintenance Shell menu, and ssh connection. You can return again with another [[:vps_-_plan9front_-_plan_9_instance_under_xen#default_pre-generated_installation|ssh]] to the allocated VPS server, an SDF VPS Maintenance Shell menu review, and a press on the "**c**" key to connect to the Plan 9 console prompt (%). 
-    * //**ed**// and "''% sam -d''" are available in the Plan 9 Image. They may be used for setting the DNS, or other tasks from the Plan 9 VPS console prompt (%), before Drawterm is accessible. An [[http://sdf.org/?tutorials/ed | ed cheat-sheet]] is available. Additional editors are operational from a [[:vps_-_plan9front_-_drawterm_rio_and_stats#drawterm|Drawterm]] Rio rc prompt: acme, [[:vps_-_plan9front_-_acme_sam_abaco_mothra_and_man#sam|sam]], or ''% sam -d''. 
- 
-|% [[:vps_-_plan9front_-_acme_sam_abaco_mothra_and_man#sam|sam -d]]| Editing will be done with the command language only, as in //ed//.| 
- 
- 
-=== Configuring a dynamic prompt === 
- 
-To have a prompt that shows your pwd and user name, add the following lines to your lib/profile. Place them in the 'case cpu' section replacing the cpu% prompt line  
- 
-<code> 
-prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ') 
-fn cd {builtin cd $* && prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')} 
-</code> 
- 
-These lines update the prompt, and replace the 'cd' command so that the prompt is updated each time you change a directory. 
- 
-===== ed ===== 
- 
-Ed is a text editor, and similar to [[:vps_-_plan9front_-_acme_sam_abaco_mothra_and_man#sam|sam -d]]. Using the ''% sam -d'' examples from [[:vps_-_plan9front_-_acme_sam_abaco_mothra_and_man#sam|Sam]], it's possible to use ''% ed''. The mentioned examples are from a Drawterm Rio rc prompt. 
- 
-<code> 
-  % cd samtest 
-  % cp /lib/ndb/local local-1ed 
-</code> 
- 
-<code> 
-  % ed local-1ed 
-  291 
-  /ip= 
-  ip=127.0.0.1 sys=localhost dom=localhost 
-  s/ip=/#ip= 
-  #ip=127.0.0.1 sys=localhost dom=localhost 
-  $ 
-  #ip=127.0.0.1 sys=localhost dom=localhost 
-  a 
-  ip=YOUR_IP sys=plan9 dom=plan9 dns=205.166.94.20 
-  . 
-  w 
-  341 
-  q 
-  % 
-</code> 
- 
-<code> 
-  % cp /rc/bin/termrc.local termrc.local-1ed 
-  % ed termrc.local-1ed 
-</code> 
- 
-<code> 
-  % ed termrc.local-1ed 
-  424 
-  $ 
-  cpu=CP 
-  a 
-  ip/ipconfig -g 205.166.94.1 ether /net/ether0 YOUR_IP 255.255.255.0 
-  ndb/cs 
-  ndb/dns -r 
-  . 
-  w 
-  510 
-  q 
-  % 
-</code> 
- 
-^Command^ Title^ Quick Reference^ 
-|ED|ed Cheat Sheet|http://sdf.org/?tutorials/ed| 
- 
-=== network configuration === 
- 
-<sup>1</sup> [[http://sdf.org/?tutorials/Plan_9_rc|Control keys -- Available at the SDF Boot Camp VPS server console prompt]] 
- 
-Editor reference: 
- 
-|Sam, Ed, Acme|https://wiki.sdf.org/doku.php?id=vps_-_9front#editors| 
- 
-|Plan 9 Rc Survival Guide|http://sdf.org/?tutorials/Plan_9_rc| 
- 
-|[[http://doc.cat-v.org/plan_9/2nd_edition/README.html|README (slightly outdated)]] //If you think of it as UNIX, you'll often be frustrated because something doesn't exist or works differently//.|