Category: Linux

  • Ubuntu Linux – 3 Commands to Disable IPv6

    #sysctl -w net.ipv6.conf.all.disable_ipv6=1
    #sysctl -w net.ipv6.conf.default.disable_ipv6=1
    #sysctl -w net.ipv6.conf.lo.disable_ipv6=1
    //code to check
    #ip a
    ...
    //should be no IPv6 entry now.
  • OpenWRT软件包自动更新

    #crontab -e
    0 3 * * * opkg update && opkg update && opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
    >
    >
    >
    #/etc/init.d/cron enable
    #/etc/init.d/cron start

    Reference Link

  • WSL – Win11 安装手册

    Pre-requirements:

    Windows Feature:

    + Hyper-V

    +Windows Subsystem for Linux

    start > powershell (as Administrator)
    PS> wsl --install
    
  • Linux笔记本电脑忽略翻盖(配置服务器)

    把旧笔记本电脑作为Linux服务器来配置,需要把合盖休眠去掉。以下是在Centos8(RockyLinux8)下操作的步骤,也可针对有systemd系统的Linux使用。

    1. 编辑/etc/systemd/logind.conf 将所有有关Lid的配置设置为ignore
    2. 重启logind

    具体操作命令如下:

    vi /etc/systemd/logind.conf
    HandleLidSwitch=ignore
    HandleLidSwitchExternalPower=ignore
    HandleLidSwitchDocked=ignore
    
    systemctl restart systemd-logind

    参考链接