修改debian默认运行级别

众所周知,debian9和debian8已经用systemd的targets代替了原有的/etc/inittab文件,用户已无法通过更改/etc/inittab来实现更改默认运行级。修改默认桌面可通过使用systemctl命令或创建一个运行级targets文件的软链接的方式来实现。

Read more

第一篇万字长文:围绕透明代理的又一次探究

是的,你没有看错,还是这个主题。我也没什么办法,因为实在是不完美啊!比如:

  • 腾讯会议、QQ 电话等类似软件断流
  • 网易云音乐断流
  • ……

为了解决这些问题,我辗转反侧的思考,日夜不停的实验,在树莓派和 J1900 之间反复横跳,安装 OpenWrt,使用 Redirect 代替 TProxy,更换不同的 DNS 查询思路,调试 V2Ray 配置等等。直到今天(真实情况是几天前),我又重新装回了亲切的 Ubuntu 20.04,趁机记录一下过程以及一些零碎的思考。

仅以此文,作为大半年来所学知识与亲手实践之总结。

Read more

90 Linux Commands frequently used by Linux Sysadmins

There are well over 100 Unix commands shared by the Linux kernel and other Unix-like operating systems. If you are interested in the commands frequently used by Linux sysadmins and power users, you’ve come to the place. Recently, I published a five-part series covering commands often used by Linux sysadmins.

Below I’ve listed the 90 commands covered and links to each of the five posts in this series. Some of the commands listed include links to related articles. There are also thousands of commands available if we include downloadable software and scripts, such as bpytop (pictured below). However, for this article’s purpose, we will cover mostly Unix commands used on Linux by sysadmins and power users. If you find this page useful, let me know if you’d like to see similar posts in the future.

bpytop - Linux Commands frequently used by Linux Sysadmins
Pictured: bpytop – There are many system/server monitoring and network command-line tools available.

Read more

Nginx 文件上传限制配置

遇上个问题,开发了一个cms系统,运营那边一直说上传大文件失败。
修改了nginx配置(第一次修改的location下面的配置),我自己这上传成功,她那就是死活传不上去
查看nginx日志后发现,即时我在location下面限制放到4G,对他上传的文件大小并没有起到作用
我访问的路径是反向代理的路径(http://cloud.xxx.com/admin)
他访问的是ip路径
尝试修改http层的配置后解决,纪录一下

Read more

Turn off monitor automaticlly in Linux CLI

Add consoleblank to the GRUB commandline:

sudo nano /etc/default/grub

Once there, just add consoleblank=60 to GRUB_CMDLINE_DEFAULT, it should look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=60"

Then close the file and save it, after that just run sudo update-grub and voila, every time you boot the screen will turn off automatically every 60 sec. (again, if idle).

manjaro安装配置intel+nvidia双显卡

安装驱动之前先卸载现在的驱动,否则很可能会冲突。

显示所有可安装的驱动:

mhwd -l --pci

显示当前已安装驱动:

mhwd -li --pci

卸载当前驱动:

sudo mhwd -r pci [driver-name]

安装依赖:

sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus

安装nvidia闭源驱动与intel驱动混合版bumblebee:

sudo mhwd -f -i pci video-hybrid-intel-nvidia-430xx-bumblebee

启用bumblebeed服务:

sudo systemctl enable bumblebeed

将用户添加到bumblebee组:

sudo gpasswd -a $USER bumblebee

重启后遇到需要独立显卡的部分使用:

optirun [appname]