Linux: Wsl ubuntu下安装OhMyZsh

11 篇文章 0 订阅
本文介绍了如何在Windows Subsystem for Linux 2 (WSL2)上的Ubuntu 18.04系统中安装ZSH和Oh My Zsh,详细步骤包括安装ZSH、设置默认shell、安装Oh My Zsh以及切换和验证ZSH。此外,还提及了Oh My Zsh的默认主题,并列举了一些ZSH的常用快捷键,如智能补全、目录跳转等。
摘要由CSDN通过智能技术生成

人神都知道OhMyZsh的魔力,那就上吧。当然有人喜欢fish,各有各的好。
环境:WSL2, unbuntu 18.04
一、安装ZSH
(1) 安装

sudo apt-get install -y zsh

(2)验证:

zsh --version

(3)设定默认选项

chsh -s /usr/bin/zsh

二、安装oh-my-zsh
1、下载

git clone https://gitee.com/mirrors/oh-my-zsh.git
songroom@DESKTOP-MEDPUTU:~$ git clone https://gitee.com/mirrors/oh-my-zsh.git
Cloning into 'oh-my-zsh'...
remote: Enumerating objects: 29320, done.
remote: Counting objects: 100% (3158/3158), done.
remote: Compressing objects: 100% (2702/2702), done.
remote: Total 29320 (delta 1690), reused 851 (delta 432), pack-reused 26162
Receiving objects: 100% (29320/29320), 6.45 MiB | 881.00 KiB/s, done.
Resolving deltas: 100% (16855/16855), done.

2、sh install.sh
(1)进入oh-my-zsh下tools

songroom@DESKTOP-MEDPUTU:~$ ls
Manifest.toml  ]        beta  echo   install      machine_learning        oh-my-zsh  pyclick   tdenginesudo   v        xtp_another_old
Project.toml   apt-get  ctp   fosun  julia-1.7.2  machine_learning.ipynb  policy     tdengine  updateapt-get  v_learn

songroom@DESKTOP-MEDPUTU:~/oh-my-zsh$ cd tools

(2)sh install.sh

songroom@DESKTOP-MEDPUTU:~/oh-my-zsh/tools$ sh install.sh
Cloning Oh My Zsh...
remote: Enumerating objects: 1297, done.
remote: Counting objects: 100% (1297/1297), done.
remote: Compressing objects: 100% (1254/1254), done.
remote: Total 1297 (delta 26), reused 1206 (delta 24), pack-reused 0
Receiving objects: 100% (1297/1297), 1.06 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (26/26), done.
From https://github.com/ohmyzsh/ohmyzsh
 * [new branch]      master     -> origin/master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Already on 'master'
/home/songroom/oh-my-zsh/tools

Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc.

Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
Changing your shell to /usr/bin/zsh...
[sudo] password for songroom: 
Shell successfully changed to '/usr/bin/zsh'.

         __                                     __   
  ____  / /_     ____ ___  __  __   ____  _____/ /_  
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ 
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / 
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  
                        /____/                       ....is now installed!


Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.

• Follow us on Twitter: https://twitter.com/ohmyzsh
• Join our Discord community: https://discord.gg/ohmyzsh
• Get stickers, t-shirts, coffee mugs and more: https://shop.planetargon.com/collections/oh-my-zsh

➜  tools git:(master) zsh --version

三、设置主题

我看默认主题也不错了,暂时没有别的需求。

四、常用快捷键

1、TAB键 : 智能补全

2、两下TAB键:

3、快速跳转 : cd - 按TAB 键
4、自动跳转:z 命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值