一句话笔记:常用linux命令

192 字
1 分钟
一句话笔记:常用linux命令

文件系统远程挂载#

SMB

//IP地址是windows地址,后面跟上windows上的共享目录,后面的路径是linux上的挂载路径 sudo mount -t cifs //172.20.4.5/临时文件 /data/sync -o username=cad,password=tdc1718,sec=ntlm,vers=1.0

NFS

mount -t nfs -o nolock 172.20.4.106:/home /data/sync

开机挂载

开机自动挂载文件#

修改 /etc/fstab 文件, 挂载命令如:

SMB

//192.168.22.111/shared /home/www/ cifs username=xxx,password=xxx,rw,dir_mode=0777,file_mode=0777 0 0

NFS

172.20.4.106:/home /data/sync nfs username=suqishuo,password=suqishuo@4.106,rw,dir_mode=0777,file_mode=0777 0 0

curl,apt 设置代理#

curl -x socks5h://192.168.3.125:9081 -LO http://google.com

sudo apt-get -o Acquire::http::proxy=“socks5h://192.168.3.125:9081/” update apt-get -o Acquire::http::proxy=“socks5h://192.168.3.125:9081/” install xxx

批量替换文件内容#

Terminal window
sed -i 's/http:\/\/tracker\.m.com/https:\/\/tracker\.m\.com/' *.txt

软连接#

sudo ln -s “/data_20t/media/霍元甲港版导演剪辑版” “/data_20t/media/Fearless Hong Kong Version Director’s Cut 2006 Blu-Ray 1080p AVC LPCM 7.1”

配置 ipv6#

cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
auto enp3s0
iface enp3s0 inet dhcp
iface enp3s0 inet6 dhcp
autoconf 1
accept_ra 2
auto enp4s0
iface enp4s0 inet dhcp

重启网卡#

sudo /etc/init.d/networking restart

欢迎关注我的公众号

如果这篇文章对你有帮助,欢迎扫码关注公众号,后续会继续分享技术实践、踩坑记录和效率工具。

微信公众号二维码

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或打赏支持!

打赏
一句话笔记:常用linux命令
https://suqishuo.cn/one-word-linux-command/
作者
Ernest
发布于
2021-07-15
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
Ernest
一个有理想的Android程序员
公告
欢迎关注我的公众号,第一时间获取技术文章与实践记录。
微信公众号二维码
音乐
封面

音乐

暂未播放

0:000:00
暂无歌词
分类
标签
站点统计
文章
29
分类
12
标签
53
总字数
126,599
运行时长
0
最后活动
0 天前
站点信息
构建平台
GitHub Actions
博客版本
Firefly v6.13.6
文章许可
CC BY-NC-SA 4.0

文章目录