/proc/sys/kernel/panic進行設定. 預設為0, 也就是不會自動重啟系統kernel.panic = 5 之後開機即自動設定完成echo $XDG_CURRENT_DESKTOP或echo $DESKTOP_SESSION 查看screenfetchsudo apt-get install screenfetch screenfetch # 得在桌面上开的 terminal 才有桌面信息, ssh 没有。
pgrep -l "gnome|kde|mate|cinnamon|lxde|xfce|jwm" # 或 ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm" # 或 ls /usr/bin/*session*
sudo apt install hardinfodpkg, apt-get, aptitudeyum# 添加32位包索引 $ sudo dpkg --add-architecture i386 $ sudo apt-get update
/etc/init.d/skeleton使用start-stop-daemon启动nodejs保存输出的方法:
start-stop-daemon --start --quiet \ --pidfile $PIDFILE -b -m --startas \ /bin/bash -- -c "exec ${NODE_PATH} ${NODE_SCRIPT} >> ${LOG_PATH} 2>&1"
/etc/ld.so.conf 动态链接搜索路径设置, 改完后需要 sudo ldconfigldconfig -p 列举动态链接库列表socat -d -d PTY PTY# 设置波特率 ## 查看当前信息 $ stty -F ttyO1 ## 设置波特率 $ stty -F ttyO1 38400 # 监听 $ od -t x1 ttyO1 # 写 $ echo hello > ttyO1 # 或者用 screen 读写 $ screen tty01 38400
/var/cache/locate/locatedb。一般来说,这个数据库文件每天通过 cron 自动更新。可执行 sudo updatedb 来手动更新。 假如想要查找一个名为 linux.html 的文件,可以执行:locate linux.html。locate 选项 -r即可使用正则表达式。具体 man locate 查看说明.find 位置 -name 文件名称例如 find / -name linux.html。find 也可以根据文件大小-size n 、-atime n 来搜索文件。 此外,find支持使用正则表达式,只需指定 -regex . 具体可以 man find 查看说明. od -x <file>, 具体man od;vim -b <file>打开后,输入命令 :%!xxd;printf “\x41\x41” | dd of=big_binary.dat bs=1 count=2 conv=notrunc seek=888888 ;