linux 常用技巧
1. 重新获取 ip
sudo dhclient -r sudo chclient
2. 用户不在 su 列表(is not in the sudoers file)
先执行 su root 切换到 root 用户 修改 /etc/sudoers 文件(u+w 权限) 使用编辑器在 root ALL=(ALL) ALL 下面添加一行: alan ALL=(ALL) ALL 保存,并恢复权限即可
3. 查看进程的启动文件及进程打开的文件
# 查看进程启动目录 先通过执行 ps -aux | grep xxx 的方式拿到进程 pid 然后执行 ll /proc/pid 留意 cwd 链接输出 # 查看进程打开的文件 执行 ls -p pid
4. debian 安装拼音输入法
debian 12 安装后,默认安装了 ibus 输入法,但没有装拼音 # 启用 ibus 通过 supper + A,打开所有程序,启动 Input Method 程序 选择 “yes”,选择 ibus 输入法 # 安装拼音 sudo apt install ibus-pinyin # 启用拼音 在 “设置” > “键盘”,添加:“Chinese(pinyin)” 输入源,并重启 # 切换 快捷方式为:Super + Shift + Space
浙公网安备 33010602011771号