Hi, This post has been written to create a beautiful and useful custom operating system shell setup for developers, data scientists or everyone who want to have unusual linux,*nix or macos shell. This is completely simple guide for installation of shell setup for best efficiency.
install zsh and ohmyzsh
## for Debian/Ubuntu
sudo apt-get install zsh
## for RHEL/Centos/Fedora
sudo yum install zsh
## for only Fedora
sudo dnf install zsh
## for arch
sudo pacman install zsh
## for mac
brew install zsh
The package manager installed the shell on the system.
to install ohmyzsh latest version:
#using curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#or using wget
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
ohmyzsh installed under the /home/user directory as hidden. You can see the folder .oh-my-zsh and .zshrc config files. ohmyzsh will change zsh config file contents.
change the theme
Open .zshrc* config file with nano or vim and change themes:
nano ~/.zshrc
#or
vim ~./zshrc
ZSH_THEME="fino-time"
You can find different themes from the pages
install custom plugins
zsh-autosuggestion
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
zsh-autocomplete
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete
And add these to plugins tuple in .zshrc
plugins = ( git
sudo
zsh-autosuggestions
zsh-syntax-highlighting
zsh-autocomplete
)
install pyenv for python version control
Pyenv is a tool which can manage python environment and versions. It's very useful tool for all types developers.
To installation the tools:
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
and to define environment variables:
(for zsh)
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
after that:
exec "$SHELL"
To create python virtual-environments, virtualenv plugin installation is required.
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
Usage
You can install many of python, conda versions with this tools easily. You can check github repositories for more information.
## install a python environment
pyenv install 3.8.5
## create a virtual environment
pyenv virtualenv 3.8.5 myenv
after create a virtual-environment, it's usable with this command.
pyenv activate myenv
(myenv)$
Top comments (0)