Setup your Mac
Mac initial Seup
- Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Setup Terminal
- Install Nord terminal app https://github.com/arcticicestudio/nord-terminal-app
- Change default terminal theme to Nord
- Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
https://ohmyz.sh
- Install power10k
- Configure power10k
p10k configure
- Install Git
brew install git
- Install GH
brew install gh
- Install Github Copilot CLI
gh extension install github/gh-copilot
- Install tig
brew install tig
- Install z
brew install z
- Install eza
brew install eza
eza was earlier called exa- Alias
ls
toeza --colour=always --long --tree --level=1
- Alias
le
toeza --colour=always --long --tree --level=2
Add these to .zshrc
- Alias
- Install tmux
brew install tmux
Dotfiles
It is possible that you have multpile machines and you want to have same configuration on all of them. This is where dotfiles come in. Dotfiles are configuration files that are hidden and start with a dot. These files (if there are no saved passwords) can be stored in a git repository and can be cloned on any machine.
Creating Dotfiles Repository
This is a simple way to create a dotfiles repository. There are other ways to do this. This is just one way to do it. I am assuming the you have dot files for zsh and tmux. If you have other dotfiles, you can create a folder for that as well.
- Install stow
brew install stow
- Create a git repository on github called dotfiles
- Clone the repository to your local machine
git clone <repo-url>
- Change directory to dotfiles
cd ~/dotfiles
- For Shell
- Create a folder called
shell
mkdir shell
- Change directory to shell
cd shell
- Move the zshrc file to shell folder
mv ~/.zshrc .
- Move p10k.zsh to shell folder
mv ~/.p10k.zsh .
- Move to dotfiles folder
cd ..
- Create a symlink for zshrc
stow shell
- Create a folder called
- For Tmux
- Create a folder called
tmux
mkdir tmux
- Change directory to tmux
cd tmux
- Move the tmux.conf file to tmux folder
mv ~/.tmux.conf .
- Move to dotfiles folder
cd ..
- Create a symlink for tmux
stow tmux
- Create a folder called
- Add and commit the changes
git add . && git commit -m "Basic dotfiles setup"
- Push the changes to a remote repository
git push
Reusing the Dotfiles repository on a new machine
- Install stow
brew install stow
- Clone the dotfiles repository
git clone <repo-url>
- Change directory to dotfiles
cd ~/dotfiles
- Create a symlink for zsh
stow shell
- Create a symlink for tmux
stow tmux
Questions
- what is
/
-> This is a root of file system. Any path starting with / is absolute path. Everything else is relative path wrtpwd
- What is
/home
-> One of the folders in the root - What is
~
-> This is a home directory of the user. This is an absolute path - What is
.
-> This is a current directory - What is
..
-> This is a parent directory of pwd. - What is
./
-> . refered to pwd