Last active
April 22, 2018 17:11
-
-
Save justinc1/d65f3df3d8b3b0b1601f05d71c406342 to your computer and use it in GitHub Desktop.
Execute bash in net namespace, with informative promt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
NS=$1 | |
export PS1="[\u@\h \W] ($NS) \$ " | |
sudo ip netns exec $NS bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment