saahityaedams

12 Oct 2024

Fresh Linux Install and Setup

I have a slightly old gaming laptop (i5, 256GB SSD, 1TB HDD, NVIDIA GeForce GTX 1050) which ran Ubuntu + windows. I haven’t used this laptop since college and decided to use it as an always-on home server and secondary machine in my room plugged into power. There is no concrete plan, but high-level plans include using the 1 Tb hard disk as backup and media store (still researching the best way), self hosting some software, and play around with serving tiny LLM models from it.

Distro: PopOS

I found PopOS to be most suitable distro for me and most people. It has the ease-of-use of Ubuntu, with none of the bloat. It also makes using the NVIDIA graphic card much easier. I didn’t have to do any driver-related-install stuff, since they come working out of the box when you use the popos- nvidia image. (For installation see: https://support.system76.com/articles/install-pop/)

Development Tools

Zed

Great code editor

curl -f https://zed.dev/install.sh | sh

Rust

Programming language

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

uv

Python package management tool (alternative to pip)

curl -LsSf https://astral.sh/uv/install.sh | sh

System Tools

fzf

Helps fuzzy find files or commands in shell history

sudo apt install fzf

Plus, add source /usr/share/doc/fzf/examples/key-bindings.bash in .bashrc

<Ctrl-R> for fuzzy finding terminal history and <Ctrl-T> for file paths

tmux

Basically I only use it for mainting terminal state when I disconnect from the host.

sudo apt install tmux

Start a new tmux session with tmux new. To disconnect from the current session, type <Ctrl-B> <D>. To attach to the disconnected session, run tmux attach -t <session-name-0-by-default>

Also Ref: https://gist.github.com/MohamedAlaa/2961058

htop

Great system monitoring (CPU, Mem, process usage plus much more) tool.

sudo apt install htop

Also Ref: https://gist.github.com/makeittotop/f80965c814dcab655bb2

xtrlock

Since I want my machine running all the time, it has been configured to not auto suspend or goto sleep. This means I have to lock my screen and keyboard when I am not using the actual host.

sudo apt install xtrlock

jq

JSON querying

sudo apt install jq

Also Ref: https://jqlang.github.io/jq/tutorial/

Data Tools (Media, “AI”)

Ollama

“LLM management” tool

curl -fsSL https://ollama.com/install.sh | sh

ffmpeg

Processing video and audio file. I mainly used it for converting video to audio files and trimming some videos.

sudo apt install ffmpeg

Also Ref: https://tldr.inbrowser.app/pages/common/ffmpeg

yt-dlp

Install videos from youtube. More specifically download youtube songs and convert to audio (Not exactly legal).

sudo apt install yt-dlp

Also Ref: https://tldr.inbrowser.app/pages/common/yt-dlp

Networking

Tailscale

Neat Tool for putting your machines on a VPN (virtual private network). Great for sshing into the host with no fuss while still being secure. Otherwise you would have had to expose your host to public internet and do stuff like setup static ip for hosts, use ssh private key, etc to ssh into host. Free for personal use.

curl -fsSL https://tailscale.com/install.sh | sh

Run Tailscale on host by running

tailscale up --ssh

Connect from other host (macos, android) by looking up ip with tailscale and then running

ssh saahityaedams@<ip-address>

Also Ref: https://tailscale.com/kb/1193/tailscale-ssh

Conclusion

There is still some setup pending. I haven’t yet fully researched how to do backups or use the server as a remote file host and I am currently rsyncing files between hosts. Another area to investigate is tuning/optimizing the system (see https://docs.redhat.com/en/documentation/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Guide/index and https://wiki.archlinux.org/title/Improving_performance).