Skip to content

Instantly share code, notes, and snippets.

@duchenpaul
Last active November 26, 2018 05:32
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 duchenpaul/789ac7cbd5295dc21ba5f479de179ba3 to your computer and use it in GitHub Desktop.
Save duchenpaul/789ac7cbd5295dc21ba5f479de179ba3 to your computer and use it in GitHub Desktop.
  • Add sudoer
# Config editor
sudo update-alternatives --config editor

#add user to sudoer
vi /etc/sudoers (visudo)

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
username  ALL=(ALL:ALL) ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL
username        ALL=(ALL)       NOPASSWD: ALL
  • Set bash
# Set to bash shell
chsh -s /bin/bash chenny
  • Install Shell
# Install ssh server
sudo apt install -y openssh-server

# Install Basic
sudo apt install -y htop vim screen lrzsz

# Install Other
sudo apt install -y python3-pip 

# Install VNC
sudo apt install -y tightvncserver
  • Edit ~/.bashrc
vi ~/.bashrc

ip_wlan0=`hostname -I`
PS1="\e[0;35m\033[1m[ \A - ${ip_wlan0} ]\\e[m\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] "

alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'
  • Accelerate pip download
mkdir -p ~/.pip/

echo '[global]
timeout = 60
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com' > ~/.pip/pip.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment