User Tools

Site Tools


technical:programming:shell

This is an old revision of the document!


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 so it can be mounted.

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

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

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

Once the volume and diretories are mounted chroot into the new root directory.

chroot --userspace=<username> /mnt /bin/bash
technical/programming/shell.1660533005.txt.gz · Last modified: 2022/08/14 23:10 by jc