File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -397,3 +397,84 @@ $ ssh user@host 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.p
3973972) .ssh/authorized_keys文件权限必须是600
398398$ chmod 600 authorized_keys
399399```
400+
401+ 查看系统所有 shell 版本
402+ ```
403+ $ cat /etc/shells
404+ # /etc/shells: valid login shells
405+ /bin/sh
406+ /bin/dash
407+ /bin/bash
408+ /bin/rbash
409+ ```
410+
411+ 查看当前 shell 版本
412+ ```
413+ $ echo $SHELL
414+ /bin/bash
415+ ```
416+
417+ 安装 zsh
418+ ```
419+ $ sudo apt-get install zsh
420+ ```
421+
422+ 安装 oh-my-zsh
423+ Oh My Zsh 只是一个对 zsh 命令行环境的配置包装框架,但它不提供命令行窗口,更不是一个独立的 APP。
424+ Oh My Zsh 并不是某个命令行工具的替代品,而是和它们互为补充。
425+ ```
426+ $ wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
427+ ```
428+
429+ [ http://ohmyz.sh ] ( http://ohmyz.sh )
430+
431+ 替换bash为zsh:
432+ ```
433+ $ chsh -s /bin/zsh
434+ or
435+ $ chsh -s $(which zsh)
436+ ```
437+
438+ 查看 zsh 当前的版本号
439+ ```
440+ zsh --version
441+ ```
442+
443+ 将主题设置为随机
444+ ```
445+ $ vim ~/.zshrc
446+ ZSH_THEME="random"
447+ ```
448+
449+ 命令输出当前主题的名称
450+ ```
451+ $ echo $ZSH_THEME
452+ ```
453+
454+ pip 安装时默认访问 pypi 的,但是 pypi 的速度对于国内来说有点慢,还在国内也有一些 pip 的镜像源,造福广大程序员
455+ ```
456+ pipy 国内镜像目前有:
457+ http://pypi.douban.com/ 豆瓣
458+ http://pypi.hustunique.com/ 华中理工大学
459+ http://pypi.sdutlinux.org/ 山东理工大学
460+ http://pypi.mirrors.ustc.edu.cn/ 中国科学技术大学
461+ ```
462+
463+ 安装时我们可以手动指定 pip 源
464+ ```
465+ $ pip -i http://pypi.douban.com/simple install Flask
466+ ```
467+
468+ 或者修改 pip 源配置
469+ ```
470+ $ mkdir ~/.pip
471+ $ vim ~/.pip/pip.conf
472+ ```
473+
474+ ```
475+ [global]
476+ trusted-host = pypi.douban.com
477+ index-url = http://pypi.douban.com/simple
478+ #index-url = http://mirrors.aliyun.com/pypi/simple/
479+ ```
480+ 由于最新的 pip 安装需要使用的 https 加密,所以在此需要添加 trusted-host
You can’t perform that action at this time.
0 commit comments