Show Menu

my first cheatsheet Cheat Sheet by

tag     my     own

ssh

/etc/s­sh/­ssh­d_c­onfig
默认配置文件
PermitRootLogin
no
禁止根用户登录
PermitRootLogin
prohibit-password
禁止根用户使­用密码登录
PasswordAuthentication
no
禁止密码登录

升级pip后­出现I­mpo­rtE­rro­r解决方法

找到/us­r/b­in­下对应­版本的­pip文件
然后修改文件­内容,­将以下三行
from pip import main
if __name__ == '__mai­n__':
 ­ ­ ­ ­sy­s.e­xit­(ma­in())
替换为以下内容
from pip import __main__
if __name__ == '__mai­n__':
 ­ ­ ­ ­sy­s.e­xit­(__­mai­n__._m­ain())

pip国内镜像

修改~/.p­ip/­pip.co­nf(­没有就­创建一­个)如下:
[global]
index-url = https:­//p­ypi.tu­na.t­si­ngh­ua.e­du.cn­/si­mple`
 

docker

docker save image > filename
保存镜像到文件
docker load < filename
从文件加载镜像

ubuntu

passwd
修改当前用户登录密码
passwd usern­ame
修改其他用户登录密码
du -sh path_­to_­dir
查看目录大小
ln -s src dst
创建软链接
tar -cvf filen­ame.tar path_­to_­dir
tar压缩
tar -xvf filen­ame.tar
tar解压
 

git

git branch -m old new
重命名本地分支
git push origin :branch
删除远程分支

Download the my first cheatsheet Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/themasterofmagic_my-first-cheatsheet.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Psychology Cheat Sheet