|
#!/usr/bin/env bash |
|
|
|
cd |
|
|
|
if [ -d "$HOME/Downloads" ]; then |
|
rm -rf "$HOME/Downloads" |
|
fi |
|
echo "export WINUSER=$WINUSER" >> .bashrc |
|
ln -s /mnt/c/Users/"$WIN_USER" "$HOME"/ |
|
ln -s /mnt/c/Users/"$WIN_USER" "$HOME"/Downloads |
|
|
|
sudo apt update && sudo apt upgrade -y |
|
sudo apt install -y \ |
|
libosmesa6 libglx-mesa0 mesa-drm-shim pciutils \ |
|
mesa-va-drivers intel-media-va-driver-non-free \ |
|
build-essential git git-extras cmake flex bison meson direnv \ |
|
p7zip bzip2 zstd bat cht.sh dialog minicom \ |
|
python3-virtualenv python3-pip python3-pip-whl python3-setuptools-whl \ |
|
python3-requests python3-samba python3-tk pipx pandoc \ |
|
python3-pygments python3-pil python3-plotly imagemagick \ |
|
bash-completion shellcheck fish fzf eza micro btop tealdeer \ |
|
ripgrep plocate jq yq csvkit csvkit-doc csvtool \ |
|
xorg xterm xserver-xorg-video-intel xserver-xorg-input-libinput \ |
|
xsel xclip xcb xcb-proto xdg-utils ssh-askpass xdg-desktop-portal \ |
|
wayland-protocols waypipe weston wl-clipboard xwayland xwayland-run \ |
|
r-base r-cran-plotly r-cran-rsconnect \ |
|
shiny-server r-cran-shinythemes r-cran-shinyjs \ |
|
curl wget httpie arp-scan arping nmap ssh samba smbclient \ |
|
docker.io docker-compose-v2 docker-doc docker-buildx \ |
|
sqlite3 sqlite3-tools \ |
|
openjdk-21-jdk openjdk-21-jre |
|
|
|
|
|
|
|
python3 -m virtualenv .venv |
|
source .venv/bin/activate |
|
echo "source ~/.venv/bin/activate" >> .bashrc |
|
echo "export COLORTERM=truecolor" >> .bashrc |
|
echo "export MICRO_TRUECOLOR=1" >> .bashrc |
|
echo ".venv" >> .gitignore |
|
echo ".motd_shown" >> .gitignore |
|
echo ".bash_logout" >> .gitignore |
|
echo ".landscape" >> .gitignore |
|
echo ".sudo_as_admin_successful" >> .gitignore |
|
echo "alias ls=eza" >> .bashrc |
|
alias ls=eza |
|
echo "Your Windows Download folder is now linked to your Ubuntu Download folder" |
|
echo "You can find it at ~/Downloads" |
|
echo "Your Windows Home folder is now linked to ~/$WIN_USER" |
|
ls |
|
echo "" |
|
echo "Your shell will start inside a python virtual environment automatically, so you are safe to install common pip packages" |
|
sudo docker volume create portainer_data |
|
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.21.4 |
|
echo "Your personal portainer instance is running at https://localhost:9443 " |
|
echo "ctrl+click to open if you are using Windows Terminal and not the old Windows console" |
|
exec bash |