一些记不住的Linux和Docker命令。
Jupyter Notebook
1. 安装
升级pip3 pip3 install --upgrade pip&pip3 install jupyter
2.运行
查看帮助jupyter notebook -h
运行jupyter notebook
默认888端口
指定端口 jupyter notebook --port <XXX>
后台运行 jupyter notebook --no-browser
3.主题设置
安装pip3 install jupyterthemes
列出可用的主题jt -l
选择主题jt -t XXX
4.扩展设置
安装
1 | pip install jupyter_contrib_nbextensions |
Homebrew
安装
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
换源
1 | git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git |
使用
1 | // 查询: |
iTerm2 + Oh My Zsh
被墙了需要手动下载并运行 https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
设置主题
- 找到文件
open ~/.zshrc
- 找到
ZSH_THEME="robbyrussell"
- 主题网站
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
alias
1.进入~/.bashrc
输入alias jn="jupyter notebook"
2.生效source ~/.bashrc
3. 应用程序别名
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
Command Line Tools
- Apple 家官网:https://developer.apple.com/download/more/
- 以 Apple ID 登录
- 在搜索框搜索
Command Line Tools
- 打开你 macOS 上的 XCode,检查其版本号
- 下载对应版本的
Command Line Tools
镜像(*.dmg
) - 从镜像里手工安装
Ubuntu 缺少依赖问题
Linux常用命令
用途 | 命令 |
---|---|
关机 | shut down -h now |
新建root用户 | sudo passwd root |
换源
1 | sudo cp /etc/apt/sources.list /etc/apt/sources_init.list |
Hexo个人博客
安装Gitbrew install git
安装nodejs
1 | brew install nodejs |
安装hexo
1 | npm install -g hexo-cli |
生成SSH添加到GitHub
1 | git config --global user.name "yourname" |
部署Hexo到Github
1 | open _config.yml |
GitBook
安装
1 | npm install gitbook-cli -g |