添加开机启动脚本

Categories: Linux
1.crontab -e 1. crontab -e 2. @reboot cd /opt/ && ./start_sslocal.sh >zx.log 2>&1 3. grep CRON -i /var/log/syslog 2.

命令行设置代理

Categories: Linux
sslocal apt install shadowsocks sslocal -c ss.json -d startss.json: { "server":"45.32.10.1", "server_port":8892, "local_port":1080, "password":"zxzxzxzxzx", "timeout":600, "method":"aes-256-cfb" } proxychains4 apt install proxychains4 vi /etc/proxychains4.conf proxychains4 curl ip.cn # 查看是否代理成功 proxychains bash # 代理整个终端proxychains4.conf: socks5 127.0.0.1 1080 GitHub polipo可代替proxychains4 apt-get install polipo vi /etc/polipo/config service polipo restart export http_proxy="http://127.0.0.1:8123/" # 可能需要执行 可加入.bashrc/etc/polipo/config: logSyslog = true logFile = /var/log/polipo/polipo.log proxyAddress = "0.0.0.0" socksParentProxy = "127.0.0.1:1080" socksProxyType = socks5 proxyPort = 8123 chunkHighMark = 50331648 objectHighMark = 16384 serverMaxSlots = 64 serverSlots = 16 serverSlots1 = 32 genpac

Read More →

Linux swap配置

Categories: Linux
#查看swap比率 cat /proc/sys/vm/swappiness # open /etc/sysctl.conf as root. Then, change or add this line to the file vm.swappiness = 10 # Reboot for the change to take effect. # You can also change the value while your system is still running with sysctl vm.swappiness=10 # You can also clear your swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect. swapoff -a swapon -a

文件及Terminal终端编码

Categories: Linux
1. set fileencoding 查看文件编码 2. set fileencdding=utf-8 设置文件编码 按wq保存 3. :e ++enc=cp936 # vim打开文档后,encoding=utf-8(locale决定的),fileencoding=latin1(自动编码判断机制不准导致的),termencoding=空(默认无需转换term编码),显示文件为乱码