Skip to content

craftzcode/ubuntu-craftzcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu Fresh Install Guide for Development (CraftzCode)

Ubuntu Development Setup License

A comprehensive guide to setting up a development environment on Ubuntu, including system configuration, shell customization, and essential development tools.

Table of Contents

  1. Initial System Update
  2. Install Homebrew
  3. Setup Git
  4. Install ZSH
  5. Choose Code Editor
  6. Install Eza & Zoxide
  7. Install Node
  8. Install Bun
  9. Install Wezterm
  10. Install TMUX
  11. Install Zen Browser
  12. Install Neovim

Initial System Update

sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential procps curl file git

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the instructions given by the installation script. You may need to add Homebrew to your PATH. The script will provide the exact commands, but they typically look like this

echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Verify Installation

brew --version

Setup Git

git config --global user.name "yourusername"
git config --global user.email "[email protected]"
git config --global init.defaultBranch main

Install ZSH

First, ensure that Homebrew is installed and up to date

brew update

Then, use Homebrew to install Zsh

brew install zsh

After the installation is complete, you can verify it by checking the Zsh version

zsh --version

If you want to make ZSH your default shell, you can use the following command

chsh -s $(which zsh)

If there's an error on setting the ZSH to be your default shell

First, verify that Zsh is correctly installed and its path

which zsh

This should return the path to Zsh, likely something like /home/linuxbrew/.linuxbrew/bin/zsh.

Check if Zsh is listed in the allowed shells

cat /etc/shells

If the path to your Homebrew-installed Zsh is not listed here, you'll need to add it.

If Zsh is not in /etc/shells, add it

echo $(which zsh) | sudo tee -a /etc/shells

Now try changing your shell again

chsh -s $(which zsh)
# OR
sudo chsh -s $(which zsh)
# OR
chsh -s /home/linuxbrew/.linuxbrew/bin/zsh
# OR
sudo chsh -s /home/linuxbrew/.linuxbrew/bin/zsh
# OR
sudo chsh -s /home/linuxbrew/.linuxbrew/bin/zsh your-username

Restart PC

Now add the path of Homebrew on ZSH

echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Customize ZSH Theme

  • Install Oh-My-Posh (Optional)
    • Follow this installation
    • Copy or download my theme craftzcode.omp.json
      curl -o ~/.config/oh-my-posh/craftzcode.omp.json https://raw.githubusercontent.com/craftzcode/ubuntu-craftzcode/main/.config/oh-my-posh/craftzcode.omp.json
  • Install Powerlevel10k (Optional)
    • brew install powerlevel10k
      echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc

Restart ZSH

source ~/.zshrc

Install ZSH Plugins

brew install zsh-autosuggestions zsh-syntax-highlighting

echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc

Restart ZSH

source ~/.zshrc

Choose Code Editor

  • Install Zed

    • curl -f https://zed.dev/install.sh | sh
    • Add the path of Zed on ZSH

      • echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.zshrc
  • Install Cursor AI Editor

    • Follow this guide to install Cursor AI Editor
  • Install Jetbrains Mono Font

Install Eza & Zoxide

brew install eza zoxide

Add this to enable Zoxide in ZSH

eval "$(zoxide init zsh)"

Add Alias for Zoxide in ZSH

alias cd="z"

Add Alias for EZA in ZSH

alias ls="eza --icons=always"
alias tree="eza --tree"

Add Alias for Neovim

alias vim="nvim"

Add Alias for Edit & Reload ZSH

alias reload-zsh="source ~/.zshrc"
alias edit-zsh="nvim ~/.zshrc"

Install Node

brew install node

Install Bun

curl -fsSL https://bun.sh/install | bash

Install Wezterm

Wezterm

Create Wezterm Config File

mkdir -p ~/.config/wezterm
nano ~/.config/wezterm/wezterm.lua

Copy or download my wezterm.lua

curl -o ~/.config/wezterm/wezterm.lua https://raw.githubusercontent.com/craftzcode/ubuntu-craftzcode/main/.config/wezterm/wezterm.lua

Exit and Re-run Wezterm

Install TMUX

brew install tmux

Install TMUX Plugin Manager (Optional)

git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm

Copy or download my statlusline.conf

curl -o ~/.config/tmux/statusline.conf https://raw.githubusercontent.com/craftzcode/ubuntu-craftzcode/main/.config/tmux/statusline.conf

Copy or download my tmux.conf

curl -o ~/.config/tmux/tmux.conf https://raw.githubusercontent.com/craftzcode/ubuntu-craftzcode/main/.config/tmux/tmux.conf

Restart TMUX

leader (ctrl + a) + :source-file ~/.config/tmux/tmux.conf

Install TMUX Plugins

leader (ctrl + a) + shift + i

Install Zen Browser

First setup the Flatpak by folling this instructions

After that download the file of Zen Browser in Flathub

Install Neovim

brew install neovim

Setup Neovim To Make It AMAZING in 2024: The Ultimate Guide

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published