Dev-JiwonShin / linux-setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

첫줄.. 이건설명안함

sudo apt -y update && sudo apt-get -y update

기본적인거 설치 1

sudo apt-get install -y git wget zsh tzdata vim openssh-server sudo ufw curl fonts-powerline
sudo locale-gen

bash에서 zsh로 변환(컴퓨터를 재부팅해야만 zsh가 적용됨)

sudo chsh -s $(which zsh)

install and setup 'oh-my-zsh'

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

change zsh theme

perl -pi -w -e 's/ZSH_THEME=.*/ZSH_THEME="agnoster"/g;' ~/.zshrc
perl -pi -w -e 's/plugins=.*/plugins=(git )/g;' ~/.zshrc

install and setup 'zsh-autosuggestions'

git clone https://github.com/zsh-users/zsh-autosuggestions
vi ~/.zshrc
source ~/zsh-autosuggestions/zsh-autosuggestions.zsh

install and setup 'zsh-syntax-highlighting'

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
vi ~/.zshrc
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

zshrc에 아래 내용 넣으면 단축키 편함

alias Vzsh="vi ~/.zshrc"
alias Szsh="source ~/.zshrc"
alias c='clear'
alias cc="clear && printf '\e[3J'"
alias cg='cargo'

zshrc에 아래 내용 넣으면 터미널에 나타나는 유저명 짧아짐

prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}

git

alias g='git'
alias gpx="git pull -X theirs"
alias gpu="git push"
alias gcam="git add . && git commit -m "
alias gcl='git clone'
alias gl="git log --pretty=oneline"
alias gh="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --graph --topo-order --abbrev-commit --decorate"
alias gh-all="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --full-history --all --graph --topo-order --abbrev-commit --decorate"

기본적인거 설치 2

sudo apt -y install build-essential cmake make clang pkg-config libssl-dev httpie librocksdb-dev jq ssh net-tools

install rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

install nvm

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install --lts

install mysql

sudo apt -y install mysql-server mysql-client

쓸모없는 파일들 함 정리해주고

sudo apt-get -y autoclean autoremove

ssh

sudo apt install ssh
sudo vi /etc/ssh/sshd_config(change your port)
sudo /etc/init.d/ssh restart
sudo netstat -anp|grep LISTEN|grep sshd

https://hei-jung.github.io/linux/linux-remote-access/

zsh--autocomplete는 링크 참고해서 따로 다운로드 받을 것

https://github.com/marlonrichert/zsh-autocomplete

About