User Tools

Site Tools


lxc:install_lxc

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lxc:install_lxc [2021/01/03 17:40] peterlxc:install_lxc [2021/01/07 20:13] (current) peter
Line 8: Line 8:
  
 <code bash> <code bash>
-sudo apt install lxc+sudo apt install lxc 
 </code> </code>
  
Line 20: Line 20:
  
 <code bash> <code bash>
-sudo apt install lxc-utils+sudo apt install lxc-utils lxc-templates
 </code> </code>
  
Line 235: Line 235:
 </WRAP> </WRAP>
  
 +----
  
 +==== Check the container status again ====
 +
 +<code bash>
 +lxc-info -n test
 +</code>
 +
 +returns:
 +
 +<code bash>
 +Name:           test
 +State:          RUNNING
 +PID:            793414
 +IP:             10.0.3.101
 +Link:           veth1000_qkOr
 + TX bytes:      1.96 KiB
 + RX bytes:      11.54 KiB
 + Total bytes:   13.49 KiB
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This shows it is running.
 +</WRAP>
 +
 +----
 +
 +==== Get a Shell inside the Container ====
 +
 +<code bash>
 +lxc-attach -n test
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  Enter **exit** to exit the Container Shell, back to the host.
 +</WRAP>
 +
 +
 +----
 +
 +==== Stop the Test Container ====
 +
 +<code bash>
 +lxc-stop -n test
 +</code>
 +
 +----
 +
 +==== Remove the Test Container ====
 +
 +<code bash>
 +lxc-destroy -n test
 +</code>
 +
 +----
  
 ===== References ===== ===== References =====
lxc/install_lxc.1609695600.txt.gz · Last modified: 2021/01/03 17:40 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki