![]() ![]() Oh My Zsh is a community-driven framework for managing your zsh configuration and comes bundled with thousands of helpful functions, helpers, plugins and themes. If you only follow one of these tips, it needs to be this one. If you experience any problems, try creating a topic on SitePoint’s forums and ask for help there. Check Your Progressīy this point you should have zsh installed and set as your default shell. You can also do this with a command: source ~/.zshrc. Note: we’ll be reloading our shell several times through out the tutorial. Currently it should contain two lines - myip and exit. This is where zsh stores a list of your previous terminal commands. zsh_history file, which is also in your home directory. Shut the terminal by typing exit, then locate the. If you’d like to experiment more with aliases, check out 7 Super Useful Aliases to make your development life easier. Providing you have the cURL program installed, you should see your current public IP address output to the terminal. Restart your shell (for example, by closing it then opening it again), then type myip. zshrc and save the file: alias myip="curl echo" In their simplest form, aliases are terminal shortcuts for regular commands. We can demonstrate how this file works by creating an alias. If you’re not sure how, search for “Show hidden dot files mac/Linux etc”. Note: file names that begin with a dot are hidden by default on most operating systems, so you’ll need to make it visible before you can edit it. This file is run whenever you start zsh and is the place where any custom configuration lives. Now let’s have a look at the file that zsh just created. However, I suggest selecting (2), which will create a configuration profile with the recommended default settings. If you select (1), you’ll be taken to a menu that allows you to configure history, keybindings and a bunch of other things. When you first open zsh, you’ll be greeted by the following menu. Note that it’s also possible to get zsh running with Cygwin. How to Use Zsh (or Another Shell) in Windows 10 - follow this one second to install zsh.How to Install and Use the Linux Bash Shell on Windows 10 - follow this one first to install WSL.I found these two to be up-to-date and easy to follow: There are various tutorials online explaining how to get up and running with zsh in Windows 10. Zsh is a Unix shell, and for it to work on Windows, you’ll need to activate Windows Subsystem for Linux (WSL), an environment in Windows 10 and 11 for running Linux binaries. Unfortunately, this is where things start to get a little complicated. If you’re running a non-Ubuntu-based distro, then check out the instructions for other distros. You’ll need to log out, then log back in for the changes to take effect.Īs with macOS, you can revert back to Bash using chsh -s $(which bash). Once the installation completes, you can check the version using zsh -version, then make zsh your default shell using chsh -s $(which zsh). On Ubuntu-based distros, you can install zsh using sudo apt-get install zsh. If at any point you decide you don’t like zsh, you can revert to Bash using chsh -s $(which bash). After issuing this command, you’ll need to log out, then log back in again for the changes to take effect. Once installed, you can set zsh as the default shell using chsh -s $(which zsh). If not, you can follow this guide to install a more recent version of zsh using Homebrew. If the version is 4.3.9 or higher, you should be good to go (we’ll need at least this version to install Oh My Zsh later on). You can check if this is the case, and if so, which version you’re running using the command: zsh -version. Most versions of macOS ship with zsh pre-installed. If you get stuck installing zsh, there’s plenty of help available online.Īt the time of writing, the current zsh version is 5.7.1. I don’t want to offer in-depth installation instructions for each operating system, but rather some general guidelines instead. However, in light of Apple’s announcement that zsh is now the standard shell on macOS Catalina, Mac users might find it especially helpful. This is a beginner-level zsh guide which can be followed by anybody (even Windows users, thanks to Windows Subsystem for Linux). zsh is a highly customizable Unix shell, that packs some very powerful features such as killer tab completion, clever history, remote file expansion, and much more. We use it to install packages from npm, to test API endpoints, to push commits to GitHub, and lots more besides. ![]() As web developers, the command line is becoming an ever more important part of our workflow. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |