Skip to main content

Linux Container LXD

"LXD is a system container and virtual machine manager that uses LXC to create and manage the containers."

Install LXD on Fedora Workstation 32

$ sudo snap install lxd
lxd 4.9 from Canonical✓ installed
$ which lxd
/var/lib/snapd/snap/bin/lxd
$ lxd --version
4.9

Install LXD on Alpine Linux

$ sudo apk add lxd

$ which lxd
/usr/sbin/lxd
$ lxd version
5.0.2

Debian 9 on LXD


lxc launch images:debian/stretch debian901
lxc exec debian901 -- /bin/bash
cat /etc/*release

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Add alias to existing image

$ lxc image ls
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |               DESCRIPTION               |  ARCH  |  SIZE  |         UPLOAD DATE         |
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
|       | de84726269bd | no     | Alpinelinux 3.12 x86_64 (20210104_0506) | x86_64 | 0.00MB | Jan 5, 2021 at 2:34am (UTC) |
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
$ lxc image alias create newalpine de84726269bd
$ lxc image ls
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
|   ALIAS   | FINGERPRINT  | PUBLIC |               DESCRIPTION               |  ARCH  |  SIZE  |         UPLOAD DATE         |
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
| newalpine | de84726269bd | no     | Alpinelinux 3.12 x86_64 (20210104_0506) | x86_64 | 0.00MB | Jan 5, 2021 at 2:34am (UTC) |
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
$

Practice

>>> THM | Gaming Server - Exploit LXD Container to get root flag

>>> THM | toc2

>>> THM | HA Joker CTF

Popular posts from this blog

Linux command: lspci

Linux command: lspci - list pci devices tuyendq@ubuntu001:~$ man lspci NAME        lspci - list all PCI devices SYNOPSIS        lspci [options] DESCRIPTION        lspci is a utility for displaying information about PCI buses in the system and devices connected to them.        By  default,  it  shows a brief list of devices. Use the options described below to request either a more verbose output or output intended for parsing by        other programs.        If you are going to report bugs in PCI device drivers or in lspci itself, please include output of "lspci -vvx" or even better  "lspci  -vvxxx"  (however,        see below for possible caveats).        Some  parts of the output, especially in the highly verbose modes, are probably intelligible only to experienced PCI hac...

The Amazon Product Advertising API

What is the Amazon Product Advertising API?

Java: Free Online Courses

The Java™ Tutorials by Oracle The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications. They include hundreds of complete, working examples, and dozens of lessons. Groups of related lessons are organized into "trails". https://docs.oracle.com/javase/tutorial/ Learn to Program in Java at edX.ogr Get started on the path to becoming a software engineer by learning core coding skills in Java—one of the most popular programming languages. https://www.edx.org/course/learn-to-program-in-java-0 Java Tutorial by javapoint.com https://www.javatpoint.com/java-tutorial Java Tutorial by SoloLearn.com I love SoloLearn because I can learn Java - and other popular programming languages - anywhere, any time on your mobile devices. https://www.sololearn.com/Course/Java/ Java on Azure https://docs.microsoft.com/en-us/learn/paths/java-on-azure/