Last active
December 20, 2022 09:52
-
-
Save mehdi89/2337bb58755bf2e1ea6a1bd6e43b67a3 to your computer and use it in GitHub Desktop.
Pro ZSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo sed -i 's/auth required pam_shells.so/auth sufficient pam_shells.so/' /etc/pam.d/chsh | |
sudo apt install curl wget git zsh -y | |
sudo chsh -s $(which zsh) | |
#install ohmyzsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
/usr/bin/zsh | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git /home/ubuntu/.oh-my-zsh/custom/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /home/ubuntu/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | |
sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc | |
source ~/.zshrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chatGPT version
Q: One line command to install zsh, ohmyzsh, zsh-autosuggestions and zsh-systax-highligting.
Here is a one-line command that you can use to install zsh, oh-my-zsh, zsh-autosuggestions, and zsh-syntax-highlighting on Ubuntu:
sudo apt-get update && sudo apt-get install zsh git wget -y && sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
This command does the following:
Once this command has completed, you should be able to use zsh as your default shell by running the following command:
chsh -s $(which zsh)
You will need to log out and log back in for the changes to take effect.
Keep in mind that this command installs the latest versions of these tools as of the knowledge cutoff of this model (2021). If you are running a newer version of Ubuntu, the command may need to be modified to install the correct package versions.