Home - yoonso0-0/thinkpad-setup GitHub Wiki
Last update : Feb 2022
Ubuntu 20.04
Some essentials
sudo apt update -y && \
sudo apt install -y wget curl git autoconf ssh \
gdb lcov ccache \
gcc g++ gfortran \
clang clang-format clang-tidy \
gnome-tweaks gnome-tweak-tool gnome-shell-extensions \
chrony libssl-dev build-essential && \
sudo add-apt-repository universe && sudo apt update -y
CMake
wget https://cmake.org/files/v3.18/cmake-3.18.2.tar.gz && \
tar -xf cmake-3.18.2.tar.gz && \
cd cmake-3.18.2 && \
./bootstrap && \
make -j8
sudo make install
Python (using pip)
sudo apt install -y python3-pip python3-numpy python3-matplotlib \
python3-ipython python3-scipy python3-h5py \
jupyter
Tex
Basic:
sudo apt install -y texlive texlive-base \
texlive-latex-base texlive-latex-extra texlive-latex-recommended \
texlive-fonts-recommended texlive-font-utils texlive-fonts-extra \
texlive-science latexmk
but this does not work well when updating packages..
First remove all existing texlive
sudo apt-get remove texlive* && \
rm -rf /usr/local/texlive/2020 && \
rm -rf ~/.texlive2020 && \
rm -rf /usr/local/texlive/2019 && \
rm -rf ~/.texlive2019
(texlive directory maybe in /usr/share
as well..)
Then, create a place for a new TexLive distribution to live, and give your user ownership of this directory
sudo mkdir -p /usr/local/texlive/2020 && \
sudo chown "$USER" /usr/local/texlive
Download and manually install TexLive
mkdir /tmp/texlive && cd /tmp/texlive && \
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip && \
unzip ./install-tl.zip -d install-tl && \
cd install-tl/install-tl-$(date +%Y%m%d) && \
sudo perl ./install-tl
Post-Installation: you need to add to the path environment
export MANPATH="$MANPATH:/usr/local/texlive/202<N>/texmf-dist/doc/man" && \
export INFOPATH="$INFOPATH:/usr/local/texlive/202<N>/texmf-dist/doc/info" && \
export PATH=/usr/local/texlive/202<N>/bin/x86_64-linux:$PATH
and update with:
sudo $(which tlmgr) update --self
sudo $(which tlmgr) update --all
Language & Keyboard input
- Click 'Mange Installed Languages' - 'Install/Remove Languages' - find Korean and click apply (need to restart)
- Settings - Region & Language - add Korean(Hangul) input source.
- Choose Korean as an input source on the top right panel.
Gnome tweaks
-
Keyboard & Mouse
- Keyboard - Additional Layout Options - Ctrl position - Caps Lock as Ctrl
- Keyboard - Additional Layout Options - Korean Hangul/Hanja keys - Make right Alt a Hangul Key
-
Startup Applications
- Chrome
- Dropbox
- Slack
-
Top Bar
- Battery Percentage :
On
- Battery Percentage :
Fonts
sudo apt install -y fonts-powerline fonts-firacode fonts-inconsolata \
fonts-oxygen fonts-noto-mono fonts-nanum \
fonts-roboto fonts-cascadia-code fonts-cmu \
ttf-dejavu ttf-ubuntu-font-family
Git
git config --global user.email "[email protected]" && \
git config --global user.name "Yoonsoo Kim"
Configuring shell
Install zsh
:
sudo apt install -y zsh
and also oh-my-zsh
:
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Zsh plugins
- auto suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
and add the plugin zsh-autosuggestions
inside .zshrc
- completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
and also add the plugin zsh-completions
.
- fast syntax highlighting
git clone https://github.com/zdharma/fast-syntax-highlighting.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
with fast-syntax-highlighting
Terminal
Preferences - Shortcuts
- New Tab :
Ctrl+T
- Close Tab :
Ctrl+W
- Tabs : Switch to Tab N :
Ctrl+N
rm
to trash
Mapping sudo apt install trash-cli
add alias rm="trash"
alias to .zshrc
SSH keys
cd ~/.ssh
ssh-keygen -t rsa -C "<email-address>"
sshfs
sshfs [email protected]:/home/ykim -o transform_symlinks -o follow_symlinks ~/sshfs/wheeler
Colorschemes
Softwares
- Google chrome
sudo dpkg -i google-chrome-stable_current_amd64.deb
- htop
sudo apt install htop
- Dropbox Requires following dependencies:
sudo apt install python3-gpg glibc-source libgtk-3-dev libglib2.0-dev libappindicator-dev
-
Slack : get
.deb
-
VScode : Settings :
"keyboard.dispatch": "keyCode"
Vim
Install NeoVim with sudo apt install -y neovim
, then add
alias vi='nvim'
alias vim='nvim'
to .zshrc
.
SpECTRE
Using docker or singularity
- VSCode with Docker container https://spectre-code.org/dev_guide_quick_start_docker_vscode.html
- https://spectre-code.org/installation.html
Native build (with clang)
Required:
sudo apt install -y gfortran libgsl-dev libjemalloc-dev \
libopenblas-dev liblapack-dev \
libhdf5-dev hdf5-tools \
libboost-dev libboost-program-options-dev
Additionals:
sudo apt install -y doxygen black pybind11-dev
pip3 install beautifulsoup4 pybtex coverxygen yapf
Catch 2
cmake -Bbuild -H. -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
Charm++
- Clone https://github.com/UIUC-PPL/charm
- Kyle : build with shared libraries, and apply patches
git clone https://github.com/UIUC-PPL/charm && \
cd charm && \
git checkout v7.0.0 && \
git apply ~<SPECTRE_ROOT>/support/Charm/v7.0.0.patch
./build charm++ multicore-linux-x86_64 clang --with-production --build-shared --destination=multicore-linux-x86_64-clang-shared -j10