Think before you speak, read before you think.

Category: Linux

  • Local ubuntu server (yyhome) configurations

    by

    in

    * rtorrent * ubuntu lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal $ hostname yyhome # cat sshd_config | grep -vE ‘^#|^$’ Include /etc/ssh/sshd_config.d/*.conf Port 22 Port 33 ChallengeResponseAuthentication no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server PasswordAuthentication no Match…

  • ubuntu wsl2

    by

    in

    # install zsh $ sudo apt install zsh https://ohmyz.sh/#install snap not working $ uname -a Linux jpuyy-PC 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal $ sudo snap install go –classic…

  • start_smb.sh

    sudo docker stop samba sudo docker rm samba sudo docker run -it –name samba -v /data/4t/share:/mount -p 139:139 -p 445:445 -d dperson/samba -p \ -s “public;/mount” 之后使用客户端使用 guest 用户登录

  • sftp chroot

    # cat /etc/ssh/sshd_config | grep -vE ‘^#|^$’ AuthorizedKeysCommand /usr/bin/google_authorized_keys AuthorizedKeysCommandUser root HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key SyslogFacility AUTHPRIV PermitRootLogin no AuthorizedKeysFile .ssh/authorized_keys PasswordAuthentication no ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials no UsePAM yes X11Forwarding yes ClientAliveInterval 420 UseDNS no AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION…

  • alpine apk

    apk add bash curl tcpdump bind-tools busybox-extras

  • badblocks check disk

    by

    in

    家里的 linux 用了好长时间了,运行一下 badblocks -v /dev/sda1 > /tmp/sda1-badsectors.txt Checking blocks 0 to 3907016703 Checking for bad blocks (read-only test):