- 安装准备
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
- 菜单中选择「设备 – 安装增强功能」,进入光盘目录,运行以下命令:
sudo ./VBoxLinuxAdditions.run
- 重启系统
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo ./VBoxLinuxAdditions.run
dpkg: 处理归档 /var/cache/apt/archives/xxxxxx(–unpack)时出错
尝试以下方法解决:
dpkg -i --force-overwrite /var/cache/apt/archives/xxxxxx
安装方法:
sudo apt-add-repository ppa:wireshark-dev/stable
sudo apt-get update
sudo apt-get install wireshark
安装过程中需要设置,选择“是”。如果错过了或选错了,就安装好之后,运行下面命令行,出现上述页面选择“是”即可。
sudo dpkg-reconfigure wireshark-common
出于安全方面的考虑,普通用户不能够打开网卡设备进行抓包,Wireshark不建议用户通过sudo在root权限下运行,应当设置当前用户权限:
sudo usermod -aG wireshark $(whoami)
注销登录。
ip addr
通常会返回至少两个设备,固定的 lo
和 不固定的设备名,假设为 eth0
。
/etc/network/interfaces
,常见配置如下:auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 24
gateway 192.168.0.1
dns-nameservers 114.114.114.114
dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge
dpkg 常见用法
docker-compose.yml
文件The other day a reader asked me that she had troubles with this kind of error:
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
She was trying to follow one of the tips mentioned in things to do to after installing Ubuntu 14.04 when she encountered this error. Its one of the common occurring update errors in Ubuntu and also one of the least annoying ones.
sudo apt-get install snmpd /*安装snmp服务*/
sudo vi /etc/snmp/snmpd.conf /*编辑snmp配置文件*/
在这里使用默认团体名public,实际环境中建议更改。
agentAddress udp:127.0.0.1:161
改为
agentAddress 192.168.1.9
192.168.1.9为本机IP,即监控服务器要监控的主机IP
sudo pkill Xorg