Skip to content

Instantly share code, notes, and snippets.

@benyanke
Last active February 4, 2019 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benyanke/5424166482f9353b6e77e5669696c5a6 to your computer and use it in GitHub Desktop.
Save benyanke/5424166482f9353b6e77e5669696c5a6 to your computer and use it in GitHub Desktop.
Serial gateway
##############################
# Load the serial console on shell open
##############################
echo ""
echo ""
echo ""
echo "######################"
echo "Loading serial console... press ctrl+c to drop to bash instead"
echo "######################"
echo ""
echo "When you are complete using the serial console, type:"
echo "\"ctrl + a\" to enable control mode, then tap \"d\""
echo ""
sleep 1;
sudo -S true < /dev/null 2> /dev/null || echo "You will be asked your password below to elevate privileges"
sleep 1;
sudo cat /dev/null || exit
sudo screen -r -d serial0 || sudo screen -S serial0 /dev/ttyUSB0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment