常用cmd命令总结

1.常用操作

cls      #清屏
set #查看环境变量
cd #切换工作目录 (换盘:直接输入 C: 或 D:)
cd.. #返回上级目录
exit #关闭cmd窗口

2.有关Python

pip install 包名 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
#安装python包,几个镜像网址:

阿里云http://mirrors.aliyun.com/pypi/simple/

中国科技大学https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban)http://pypi.douban.com/simple/

清华大学https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学http://pypi.mirrors.ustc.edu.cn/simple/

python                                  #打开python(若同时装了2和3,可修改Python安装目录中的python.exe为python2.exe以区分)
exit() 或quit() 或Ctrl键+z键+Enter键              #退出python程序(在cmd中运行python时)

3.有关网络

ipconfig  #查看本机目前的ip地址
ping 网址 #查看自己能否在此网址访问

4.打开常用工具

calc       #计算器
notepad    #记事本
write      #写字板
explorer   #资源管理器
regedit #注册表编辑器

5.定时关机

shutdown -s -t 秒数  #在设定的秒数之后关机
shutdown -r -t 秒数  #在设定的秒数之后重启
shutdown -a          #撤销关机/重启的命令

猜你喜欢

转载自www.cnblogs.com/maoerbao/p/11505785.html