Skip to content

Instantly share code, notes, and snippets.

@gangliao
Last active June 25, 2018 12:42
Show Gist options
  • Save gangliao/bed69a48bd6b87b508e48e4188c3cd0b to your computer and use it in GitHub Desktop.
Save gangliao/bed69a48bd6b87b508e48e4188c3cd0b to your computer and use it in GitHub Desktop.
# check os kernel version
echo "dump os kernel info:"
uname -a
# check IP
echo "dump IP info:"
ip -4 addr show scope global dev eth0 | grep inet | awk '{print $2}' | cut -d / -f 1
# check infiniband
echo "dump IB info:"
ip -4 addr show scope global dev ib0 | grep inet | awk '{print $2}' | cut -d / -f 1
# add sudo eva
echo "create sudo user eva:"
sudo useradd -m -d /search/odin/eva -s /bin/bash eva
sudo passwd eva
sudo echo "eva ALL=(ALL) ALL" >> /etc/sudoers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment