Last active
March 23, 2017 12:10
-
-
Save jeasinema/a156660d17c34bf30dd3f7bdfc4377ca to your computer and use it in GitHub Desktop.
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 | |
# $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