Prepare Work Env for Linux
Prepare your work environment for linux system ## Software install
git
Use git with ssh style: - generate private and public key:
1 | cd ~/.ssh && ssh-keygen -o |
- now github only support sha-2, we could use the following code to generate ```ssh-keygen -t ecdsa -b 521 -C "your_email"```
- check whether it does generate id_rsa and id_rsa.pub
- copy your id_rsa.pub to your git account setting
Note If you use git clone
timeouts, you can use ssh -vT git_url to check port or
other information
zsh
install oh my zsh - install zsh yum install zsh - change
shell to zsh chsh -s /bin/zsh - install oh-my-zsh
1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
gcc
update gcc version #### centos under 7.6
install
yum install centos-release-sclfind gcc related
yum list dev\*gccinstall gcc related
yum install devtoolset-x-gcc devtoolset-x-gcc-c++valid temporarily
source /opt/rh/devtoolset-x/enablecheck
gcc -vandg++ -vvalid permanently add
source /opt/rh/devtoolset-x-gcc-c++to your bashrc or zshrc
cento beyond 7.6
Note that devtools-x-gcc has been renamed as
gcc-toolset-x - check
yum list | grep gcc-toolset
use dnf to install
dnf install gcc-toolset-xsource to activate
source /opt/rh/gcc-toolset-x/enable
conda
follow the instruction Install Conda Linux
go
install golang - download
wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz - remove
the oldest go - use which go to find the current go -
remove rm -rf $cur_go_dir such as
rm -rf /usr/local/go - decompress
tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz - env
variable export PATH=$PATH:/usr/loca/go/bin, add to zshrc
make permanently - remove source file
rm go1.18.3.linux-amd64.tar.gz
protobuf
- download the particular version
1
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-cpp-3.7.1.tar.gz
tar -xzvf protobuf-cpp-3.7.1.tar.gz- install
1
2
3
4
5
6cd protobuf-3.7.1
./configure
make
make check
sudo make install
sudo ldconfig - to support golang
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
tmux
If you want to install tmux2, just use yum or
dnf
Install tmux 3.0 - install deps
1 | yum -y install libtermcap-devel ncurses-devel libevent-devel readline-devel |
1 | git clone https://github.com/tmux/tmux.git |
vim
follow the instruction by url
tldr
1 | dnf install nodejs |
tensorflow
tensoflow 1.15 is not supported by python3.8 and later version. If you want to install 1.15, pls install python3.7
docker
remove images store position
vscode
vscode free key pass
- local generate ssh-key
ssh-keygen -o - copy
id_rsa.pubto your remote serverid_rsa.pubandauthorized_keys
从零配置mac
系统
系统快捷键:
1 |
|
VSCode
- 选择使用
github账号同步 vim插件,repeated keys, 运行下面的指令:并且可以在光标移动的速度:1
2
3
4
5defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false # For VS Codium
defaults write com.microsoft.VSCodeExploration ApplePressAndHoldEnabled -bool false # For VS Codium Exploration users
defaults delete -g ApplePressAndHoldEnabledSystem Preference->Keyboard
Terminal
- 安装
iterm2 - 安装
homebrew - 安装
oh-my-zsh- 安装插件
https://mdnice.com/writing/6774c6693d374e548b0a4434f85dceb6
- 安装插件
- 安装
tldr:brew install tldr LazyVim配置:brew install neovim- Follow
https://www.lazyvim.org/installation
- 安装
tmuxbrew install tmux- 拷贝配置文件
mac_tmux.conf
- 配置vim模式:
在
.zshrc的plugin中加入vi-mode插件
Python
- 安装
miniconda
git
1 | cd ~/.ssh && ssh-keygen -t ecdsa -b 521 -C "your_email" |
zsh
插件 -
zsh-autosuggestions` -zsh-syntax-highlighting`