Skip to content

Instantly share code, notes, and snippets.

@jeasinema
Last active March 23, 2017 12:10
Show Gist options
  • Save jeasinema/a156660d17c34bf30dd3f7bdfc4377ca to your computer and use it in GitHub Desktop.
Save jeasinema/a156660d17c34bf30dd3f7bdfc4377ca to your computer and use it in GitHub Desktop.
# !/bin/bash
# $date: 09-16-16
# $purpose: basic configuration
# $author: jeasinema [jeasinema[at]gmail[dot]com]
CREATE_USER_NAME="jeasinema"
# Create account
echo "============= now create an account ============="
sudo useradd -s /usr/bin/fish -m $CREATE_USER_NAME
sudo usermod -aG sudo $CREATE_USER_NAME
sudo passwd $CREATE_USER_NAME
test_command() {
command -v "$1" 2&>1 >/dev/null ;
}
# install fish
echo "============= now install fish =============="
if test_command fish ; then
echo
else
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish
fi
# change user
sudo login $CREATE_USER_NAME
echo "login success!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment