apt适合手动输入(有交互); apt-get适合脚本(无交互).
Note: Migrate to Debian before Ubuntu 20.04 ends support (April, 2025).
Manage
卸载
apt-get autoremove vsftpd --purge
安装指定版本
apt-get install <package name>=<version>
列出版本
apt-cache madison <<package name>>
DebIan
sudo
sudo.d(directory):
Note also, that becasuse sudoers contents can vary widely, no attempt is made to add this
directive to existing sudoers files on upgrade. Feel free to add the above directive to the
end of your /etc/sudoers file to enabe this functionality for existing installations if you
wish! Sudo versions older than the one in Debian 11(bullseye) require the directive will only
support the old syntax #includedir, and the current sudo will happily accept both @includedir
and #includedir
install
using root:
su - root
install:
apt install sudo
manual
chmod 640 /etc/sudoers
nano /etc/sudoers
在配置文件/etc/sudoers加入:
# User privilege specification
tdtc ALL=(ALL:ALL) ALL
把文件权限改为只读:
chmod 440 /etc/sudoers
CD-ROM in source
sudo vi /etc/apt/sources.list
注释掉"deb cdrom:xxx"
##deb cdrom:xxx
- no sources file
$ sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
$ sudo apt update
Command
sudo sed -i '/cdrom/d' /etc/apt/sources.list