Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Create a Alpine Linux Chroot
- url="https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.0-x86_64.tar.gz"
- wget "$url" -O alpine.tar.gz
- mkdir alpine
- cd alpine || exit 1
- tar xvf ../alpine.tar.gz
- sudo mount --bind /dev dev
- sudo mount -t devpts devpts dev/pts
- sudo mount -t proc proc proc
- sudo mount -t sysfs sysfs sys
- sudo chroot . sh
- #once in chroot
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
- apk update
- apk add nmap
- adduser -D guest
- su guest -c sh
- #GUI with Xephyr
- #on host machine
- Xephyr -resizeable :1
- #in chroot as root
- apk add xfce4
- export DISPLAY=:1
- xfce4-session
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement