何を见てるの?君のこと见てるよ

0%

各种终端命令总结

conda命令

1、管理环境

1
2
3
4
5
6
7
8
9
10
11
12
# 创建环境
conda create -n '环境名' python='版本号'
# 删除环境
conda remove -n '环境名' --all
# 查看有哪些环境
conda info -e
# 切换环境
source activate '环境名字'
# 退出环境
source deactivate
# 查看环境下有哪些包
conda list

2、包的安装

1
conda install '包的名字'

linux常用命令

1、终端任务挂起

1
2
3
4
screen -S [任务名字] 创建终端
运行任务
ctrl+a+d挂起
screen -r [任务名字] 恢复终端

samba

本地samba连接测试

1
2

smbclient //10.0.1.6/shares-rf -U rf-dev

防火墙配置

1
2
3
4
5
6

sudo firewall-cmd --zone=public --add-port=139/tcp --permanent
success
sudo firewall-cmd --zone=public --add-port=445/tcp --permanent
success
sudo systemctl restart firewalld

docker

1、服务器运行docker版本的samba

运行docker服务

1
2

docker run -it --name samba -p 139:139 -p 445:445 -v /home/bmec/shares:/mount/shares -d dperson/samba -u "bmec;bmec@7355608" -u "rf-dev;lab7355608" -s "shares-bmec;/mount/shares;yes;no;no;all;rf-dev;rf-dev;共享文件夹"

修改密码

1
smbpasswd -a 用户名

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[shares-rf]
path = /mount/shares
browsable = yes
writable = yes
public = yes
create mask = 0777
directory mask = 0777
# wins support = yes
read only = no
locking = no
guest ok = no
veto files = /.apdisk/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
delete veto files = yes
valid users = all
admin users = rf-dev
write list = rf-dev,bmec
hide dot files = yes
max connections = 20
comment = 共享文件夹