Skip to content

Instantly share code, notes, and snippets.

@mpwoz
Last active September 29, 2023 19:47
Show Gist options
  • Save mpwoz/9057768 to your computer and use it in GitHub Desktop.
Save mpwoz/9057768 to your computer and use it in GitHub Desktop.
setup for a new linux machine
# Make sure we're up to date
apt-get -y update
apt-get -y dist-upgrade
# Some basic tools to get started
apt-get -y install vim-gtk build-essential
# Install and setup Git
apt-get -y install git
git config --global user.name "Martin Wozniewicz"
git config --global user.email "martin.woz@gmail.com"
git config --global merge.tool "vimdiff"
git config --global color.ui true
git config --global credential.helper "cache --timeout=10000"
git config --global push.default simple
# Git aliases
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.lg 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
git config --global alias.type 'cat-file -t'
git config --global alias.dump 'cat-file -p'
# Make common directories
mkdir ~/src
mkdir ~/tmp
# install Chrome
wget -P ~/tmp/ https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i ~/tmp/google-chrome-stable_current_amd64.deb
apt-get -y -f install
# Set up dotfiles to configure programs
git clone https://github.com/mpwoz/dotfiles.git ~/src/dotfiles
ln -s ~/src/dotfiles/.vimrc ~/.vimrc
ln -s ~/src/dotfiles/.vim ~/.vim
ln -s ~/src/dotfiles/.bashrc ~/.bashrc
ln -s ~/src/dotfiles/.zshrc ~/.zshrc
ln -s ~/src/dotfiles/.profile ~/.profile
ln -s ~/src/dotfiles/.i3 ~/.i3
# Install cron jobs
~/src/dotfiles/cron/setup.sh
# i3 tiling wm and some more utilities
apt-get -y install i3 i3status dmenu suckless-tools i3lock feh scrot
# Install useful desktop tools (i3 makes them obsolete)
# apt-get -y install gnome-do tilda
# Pip package manager
# apt-get -y install python-pip
# Node
# apt-get -y install g++ libssl-dev apache2-utils git-core curl
# cd ~/tmp/
# curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
# ./configure && make -j 6 && make install
# Misc.
# Set clock format string to %A %-m/%-d %t %-I:%M %P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment