Skip to content

Instantly share code, notes, and snippets.

@vitali2y
Last active March 31, 2024 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitali2y/f254088010297f03b8d53dacc632f379 to your computer and use it in GitHub Desktop.
Save vitali2y/f254088010297f03b8d53dacc632f379 to your computer and use it in GitHub Desktop.

Upgrading greenbee and greenway (Linux Mint 21.2 Victoria)

  1. Partitioning @ greenbee:
/dev/sda1 /boot/efi
/dev/sda2 /
/dev/sda2 swap
/dev/sda4 /home  # <- not format!
  1. Partitioning @ greenway:
/dev/nvme1n1p2  /
/dev/nvme0n1p2  /mnt/greenlight  # tmp
/dev/nvme0n1p1  /boot/efi
/dev/nvme1n1p3  /home  # <- not format!

  1. After Linux installation to execute next under root:
apt-get update

apt-get -y purge firefox evolution-data-server evolution thunderbird sylpheed gnumeric \
 abiword audacious pidgin rhythmbox tomboy simple-scan hexchat hexchat-common sticky \
 mysql-common warpinator cups gnome-calculator hypnotix libreoffice* onboard redshift \
 redshift-gtk thingy webapp-manager

# if no Bluetooth
apt-get -y remove bluez bluez-tools bluez-cups bluez-obexd bluetooth

apt -y install zsh mc openssh-server libtool clang gcc make autoconf autogen \
 automake cmake g++ build-essential pkg-config git keepassx libreoffice-calc \
 libreoffice-draw libreoffice-impress libreoffice-writer dia ffmpeg mpv inkscape \
 gimp openvpn xed ufw libssl-dev sqlite3 libsqlite3-dev sshpass \
 libc++-12-dev libstdc++-12-dev
apt-get -y remove openssh-client openssh-server && apt-get install -y openssh-client \
 openssh-server

Chromium: find the latest release number @ https://fastmirror.pp.ua/linuxmint/pool/upstream/c/chromium/
F="chromium_114.0.5735.198~linuxmint1%2Bvictoria_amd64.deb"; wget \
 https://fastmirror.pp.ua/linuxmint/pool/upstream/c/chromium/$F
F="chromium_114.0.5735.198~linuxmint1+victoria_amd64.deb"; dpkg -i $F && rm $F

# Opera: find the latest release number @ https://download3.operacdn.com/pub/opera/desktop/
V="99.0.4788.9"; wget \
 https://download3.operacdn.com/pub/opera/desktop/${V}/linux/opera-stable_${V}_amd64.deb && \
 sudo dpkg -i ./opera-stable_${V}_amd64.deb && rm -f ./opera-stable_${V}_amd64.deb

ufw allow ssh && ufw enable
  1. Under ordinary user (vit)
# Rust
curl https://sh.rustup.rs -sSf | sh -s -- -y

# NodeJS: find the latest release number @ https://nodejs.org/dist/latest/
V="21.1.0"; cd /usr/local && wget \
 https://nodejs.org/dist/latest/node-v$V-linux-x64.tar.gz && tar xvf \
 node-v$V-linux-x64.tar.gz && ln -s node-v$V-linux-x64 node && cd bin && \
 ln -s /usr/local/node/bin/node && ln -s /usr/local/node/bin/npm && \
 ln -s /usr/local/node/bin/npx && cd - && rm -f node-v$V-linux-x64.tar.gz

# Firefox: find the latest release number @ https://ftp.mozilla.org/pub/firefox/releases/
export V="124.0"; cd ~; wget \
 https://ftp.mozilla.org/pub/firefox/releases/$V/linux-x86_64/en-US/firefox-$V.tar.bz2; \
 sudo -E sh -c 'cd /usr/local; mv $HOME/firefox-$V.tar.bz2 .; rm -f ./firefox; \
 tar xvf firefox-$V.tar.bz2; mv ./firefox ./firefox-$V; \
 ln -s ./firefox-$V ./firefox; cd -'

# VSCodium: find the latest release number @ https://github.com/VSCodium/vscodium/releases/
V="1.84.2.23314"; cd /home/vit/Downloads/ && wget \
 https://github.com/VSCodium/vscodium/releases/download/$V/VSCodium-linux-x64-$V.tar.gz; \
 sudo -- sh -c 'V="1.84.2.23314"; F="VSCodium-linux-x64-$V.tar.gz"; cd /usr/local; \
 rm -f ./VSCodium /usr/local/bin/codium; mkdir ./VSCodium-$V; \
 ln -s /usr/local/VSCodium-$V /usr/local/VSCodium; \
 ln -s /usr/local/VSCodium/bin/codium /usr/local/bin/codium; cd -; \
 cd /usr/local/VSCodium-$V; cp /home/vit/Downloads/$F .; tar xvf $F; rm -f $F; cd -'

# SQLiteStudio: find the latest release number @ https://github.com/pawelsalawa/sqlitestudio/releases
V="3.4.4"; wget \
 https://github.com/pawelsalawa/sqlitestudio/releases/download/$V/SQLiteStudio-$V-linux-x64-installer.run && \
 chmod +x SQLiteStudio-$V-linux-x64-installer.run && \
 ./SQLiteStudio-$V-linux-x64-installer.run

# Blue Recorder
flatpak install flathub sa.sy.bluerecorder

# oh-my-zsh
mv .oh-my-zsh/ .oh-my-zsh-$(date +%y%m%d%H%M); curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh && chsh -s /bin/zsh

# mold linker
V="2.30.0"
cd ~/.local
rm -f mold bin/mold
wget https://github.com/rui314/mold/releases/download/v$V/mold-$V-x86_64-linux.tar.gz
tar xvf mold-$V-x86_64-linux.tar.gz
ln -s mold-$V-x86_64-linux mold
ln -s ~/.local/mold/bin/mold ~/.local/bin/mold
cd -

rustup component add rust-analyzer

# helix editor
V="24.03"; cd ~/.local && wget https://github.com/helix-editor/helix/releases/download/$V/helix-$V-x86_64-linux.tar.xz && tar xvf helix-$V-x86_64-linux.tar.xz; rm ./helix; ln -s helix-$V-x86_64-linux helix
V="2023-10-30"; wget https://github.com/artempyanykh/marksman/releases/download/$V/marksman-linux-x64 && chmod +x marksman-linux-x64 && mv marksman-linux-x64 ~/.local/bin/marksman

# helix is a default editor
echo "export VISUAL=~/.local/bin/hx" >> ~/.zshrc
echo "export EDITOR=$VISUAL" >> ~/.zshrc

# cargo binstall
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

## Rust utils
sudo apt install librust-alsa-sys-dev libpcap-dev  # for sniffnet
cargo binstall -y ripgrep
mold -run cargo install --locked broot xplr simple-http-server igrep gitui sniffnet femto-feed aichat jnv slumber  # TODO: to use "cargo binstall" too?
ln -s ~/.cargo/bin/simple-http-server ~/.cargo/bin/hs

## 2048 game
git clone https://github.com/pierrechevalier83/2048-rs.git && cd 2048-rs && mold -run cargo build --release && mv ./target/release/game-2048 ~/.local/bin && cd .. && rm -rf 2048-rs

# V="0.37.2"; wget https://github.com/zellij-org/zellij/releases/download/v$V/zellij-x86_64-unknown-linux-musl.tar.gz && tar xvf zellij-x86_64-unknown-linux-musl.tar.gz && strip zellij && mv zellij ~/.cargo/bin
# mkdir ~/.config/zellij; zellij setup --dump-layout default > ~/.config/zellij/config-layout.kdl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment