环境变量
-
查看用户环境变量
echo $PATH
-
添加环境变量(临时)
echo $PATH
-
添加环境变量(永久,对于用户有效)
vim ~/.bashrc
export PATH="/opt/STM/STLinux-2.3/devkit/sh4/bin:$PATH"
-
添加环境变量(永久,对于整个系统所有用户有效)
vim /etc/profile
在文档最后,添加:
export PATH="/opt/STM/STLinux- 2.3/devkit/sh4/bin:$PATH"
保存,退出,然后运行:
source /etc/profile
-
导出当前所在环境:
conda env export > py36.yaml
-
安装环境文件yaml:
conda env create -f py36.yaml
好用的命令
vi ~/.bashrc
alias runtf='docker start tf;docker exec -it tf /bin/bash'
alias abc='. /mnt/md0/qy/qy/miniconda3/bin/activate;cd /mnt/md0/qy/qy/project/imc/unet;conda activate tf;jupyter notebook'
alias acconda='. /mnt/md0/qy/qy/miniconda3/bin/activate'
alias ab='. /mnt/md0/qy/qy/miniconda3/bin/activate;cd /mnt/md0/qy/qy/project/imc/unet;conda activate tf'
alias jp='jupyter notebook'
磁盘系统命令
shell编程
- 解压并打开文件
zcat ***.***.gz
- 查看有多少列
awk '{print NF}' filename
网友评论