From 882de74fd55641fdde34782bb3d509b86015f484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 26 Mar 2018 18:53:57 +0200 Subject: Add simple function for chrooting with bash --- shellrc.d/common | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shellrc.d/common') diff --git a/shellrc.d/common b/shellrc.d/common index ae8216e..d52767b 100644 --- a/shellrc.d/common +++ b/shellrc.d/common @@ -83,3 +83,8 @@ ssh-clear() { rm -rf ~/.cache/ssh mkdir -p ~/.cache/ssh } + +# Chroot to bash to given path +chroot-bash() { + sudo chroot "$1" /bin/bash +} -- cgit v1.2.3