A comprehensive guide to setting up a development environment on Ubuntu, including system configuration, shell customization, and essential development tools.
- Initial System Update
- Install Homebrew
- Setup Git
- Install ZSH
- Choose Code Editor
- Install Eza & Zoxide
- Install Node
- Install Bun
- Install Wezterm
- Install TMUX
- Install Zen Browser
- Install Neovim
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential procps curl file git
/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
git config --global user.name "yourusername"
git config --global user.email "[email protected]"
git config --global init.defaultBranch main
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
-
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
- Follow this guide to install
-
Install Jetbrains Mono Font
- Follow this installation
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"
brew install node
curl -fsSL https://bun.sh/install | bash
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
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
First setup the Flatpak
by folling this instructions
After that download the file of Zen Browser
in Flathub
brew install neovim