User Tools

Site Tools


technical:programming:shell

Table of Contents

Bash Shell

Xorg

Multiple Xorg servers can be started from a virtual terminal console.

startx </path/to/displaymanager> -- <display> <virtual-terminal>

Start a Xorg server running fluxbox on display1 vt7.

startx /usr/bin/fluxbox -- :1 vt7

Start a Xorg server running emacs on display2 vt8.

startx /usr/bin/emacs -- :2 vt8

chroot

The chroot command changes the root directory. This can be useful when repairing a system in an unbootable state.

A luks encrypted volume must be decrypted before it can be mounted. The cryptsetup command can be used to decrypt an luks encrypted volume.

cryptsetup open --type luks /dev/<volume> cryptvg

Next the decrpyted volume will be mounted along with the /proc, /sys, and /dev directories.

mount /dev/cryptvg /mnt; cd /mnt; mount -t proc /proc proc; mount --rbind /sys sys; mount --rbind /dev dev

With the volume and directories mounted chroot into the new root directory.

chroot --userspace=<username> /mnt /bin/bash
technical/programming/shell.txt · Last modified: 2022/08/17 08:26 by jc