
ZSH - A Better Shell - Chris Titus Tech
video description
Date: 2022-03-21
Related videos
Comments and reviews: 10
yramagicman
Don't edit /etc/passwd directly! You can seriously bork your system if you get a syntax error in there. If you must edit /etc/passwd directly use sudo vipw, which will copy /etc/passwd to a tmp file and make sure the syntax is correct before overwriting /etc/passwd.
The correct way to change your shell is to:
1. Confirm that the full path of the shell you want is in /etc/shells. Something like -grep -$(which zsh)- /etc/shells- will do just fine. If nothing is returned from grep then -echo -$(which zsh)- - sudo tee -a /etc/shells- will fix the problem. (The echo probably isn't even necessary.)
2. Use chsh to change your shell. -chsh -s $(which zsh)- is the safest way to accomplish this. It will prompt you for your password, then set your shell to the correct path in /etc/passwd
reply
Don't edit /etc/passwd directly! You can seriously bork your system if you get a syntax error in there. If you must edit /etc/passwd directly use sudo vipw, which will copy /etc/passwd to a tmp file and make sure the syntax is correct before overwriting /etc/passwd.
The correct way to change your shell is to:
1. Confirm that the full path of the shell you want is in /etc/shells. Something like -grep -$(which zsh)- /etc/shells- will do just fine. If nothing is returned from grep then -echo -$(which zsh)- - sudo tee -a /etc/shells- will fix the problem. (The echo probably isn't even necessary.)
2. Use chsh to change your shell. -chsh -s $(which zsh)- is the safest way to accomplish this. It will prompt you for your password, then set your shell to the correct path in /etc/passwd
reply
Whisley
I decided to give it a go after years since the last time I played with this.
I followed your website but suggestions, jump, change the colour when a known command is inserted, none of that are working. Yes, the packages were installed. If anyone has any idea...
When I tried to call gcloud tho, it does show the cloud project I am connected with which is awesome, and graphically saves your ass from running commands in production instead of the staging cloud hahaha
reply
I decided to give it a go after years since the last time I played with this.
I followed your website but suggestions, jump, change the colour when a known command is inserted, none of that are working. Yes, the packages were installed. If anyone has any idea...
When I tried to call gcloud tho, it does show the cloud project I am connected with which is awesome, and graphically saves your ass from running commands in production instead of the staging cloud hahaha
reply
Christopher
Hi Chris, I'm really a fan of zsh and powerlevel10k, but I noticed something. You included instructions to install zsh-syntax-highlighting, but after the installation is done, there's no syntax highlighting in the terminal. Would you be willing to do a followup video for setting up syntax highlighting?
reply
Hi Chris, I'm really a fan of zsh and powerlevel10k, but I noticed something. You included instructions to install zsh-syntax-highlighting, but after the installation is done, there's no syntax highlighting in the terminal. Would you be willing to do a followup video for setting up syntax highlighting?
reply
Submersed24
I'm very confused, I installed nvm on a bash shell profile.. is there any way to move it to a zsh shell? Will it cause issues if I put some things on zsh and some on bash
reply
I'm very confused, I installed nvm on a bash shell profile.. is there any way to move it to a zsh shell? Will it cause issues if I put some things on zsh and some on bash
reply
David
An even easier way to change your default shell is using the -chsh- command. For Ubuntu-based distros it's in the -util-linux-user- package if it's not already installed.
reply
An even easier way to change your default shell is using the -chsh- command. For Ubuntu-based distros it's in the -util-linux-user- package if it's not already installed.
reply
Seth
The ugly default prompt turned me off at first (I don't like the % sign as the prompt), but when I learned to customize it I instantly switched from bash.
reply
The ugly default prompt turned me off at first (I don't like the % sign as the prompt), but when I learned to customize it I instantly switched from bash.
reply
Chris
I dont know if you covered this but you might have to add /snap/bin to PATH on the last line of .zshrc .... I thought I lost sublime for a little bit
reply
I dont know if you covered this but you might have to add /snap/bin to PATH on the last line of .zshrc .... I thought I lost sublime for a little bit
reply
Nate
i consider myself a linux noob because i use nano - but surprised to find Chris uses it? Interesting you are not using Micro or VIM...
reply
i consider myself a linux noob because i use nano - but surprised to find Chris uses it? Interesting you are not using Micro or VIM...
reply
Ricardo
Could you please tell me how to install the Matrix screensaver we can see on the background? I'm using Arch... Thanks in advance...
reply
Could you please tell me how to install the Matrix screensaver we can see on the background? I'm using Arch... Thanks in advance...
reply
Ted
Back in the day, they wished they had full colour screens. Here we are in 2021, using black and green on Arch! Love it. :)
reply
Back in the day, they wished they had full colour screens. Here we are in 2021, using black and green on Arch! Love it. :)
reply
Add a review, comment
Other channel videos















