一句话笔记:常用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
批量替换文件内容
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 interfaceauto loiface lo inet loopbackauto enp3s0iface enp3s0 inet dhcpiface enp3s0 inet6 dhcpautoconf 1accept_ra 2auto enp4s0iface enp4s0 inet dhcp重启网卡
sudo /etc/init.d/networking restart
欢迎关注我的公众号
如果这篇文章对你有帮助,欢迎扫码关注公众号,后续会继续分享技术实践、踩坑记录和效率工具。

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



