Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active August 9, 2023 16:02
Show Gist options
  • Save peteristhegreat/04864e388458fd3f251d34c9d30f5dfd to your computer and use it in GitHub Desktop.
Save peteristhegreat/04864e388458fd3f251d34c9d30f5dfd to your computer and use it in GitHub Desktop.
Setup Debian Box, Ubuntu, Linux

Introduction

Some steps for getting a clean ubuntu machine up to being ready. Mostly a list of apt packages I like this year.

apt install

sudo apt-get update
sudo apt install curl unzip tldr tree lsb-release \
  python3 python-is-python3 python3-pip \
  dos2unix vim figlet toilet git gpg jq mlocate moreutils

dotfiles

git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh
cd && rm -rf bin brew.sh init
mkdir src
mkdir .ssh && chmod 700 .ssh

cat >> ~/.bash_profile
#########################
# Bash History Persistence
export HISTCONTROL=ignoredups:erasedups  # no duplicate entries
export HISTSIZE=100000                   # big big history
export HISTFILESIZE=100000               # big big history
shopt -s histappend                      # append to history, don't overwrite it

if [[ $PROMPT_COMMAND == *"history"* ]]; then
	:
else
	
	# Save and reload the history after each command finishes
	#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
	export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
fi
#
########################

PATH="$PATH:$HOME/.local/bin"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# Press Ctrl-D

# Add these lines to your ~/.inputrc (create the file if it doesn't exist):
echo '
 "\e[A": history-search-backward
 "\e[B": history-search-forward
' >> ~/.inputrc

TL;DR

mkdir -p $HOME/.local/share/tldr
tldr -u

Dev languages

https://github.com/nvm-sh/nvm#installing-and-updating

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install --lts
nvm use --lts

https://julialang.org/downloads/platform/#cross-platform_installer

pip install jill -U
jill install 1.6

Git

git config --global user.email "[email protected]"
git config --global user.name "Your Name"
gpg --quick-gen-key 'Your Name <[email protected]>'
ssh-keygen -t ed25519 -C "comp-info-username"
cat ~/.ssh/id_ed25519.pub

https://github.com/settings/ssh/new

Cloud connections

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm -rf aws/ awscliv2.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment