添加存储库时是否可以跳过确认步骤?

Avi*_*Raj 3 repository add-apt-repository

当我通过运行添加存储库时

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
Run Code Online (Sandbox Code Playgroud)

它输出这个对话框:

Updated versions of X.org drivers, libraries, etc. for Ubuntu.

This PPA is for stable upstream releases of X.org components.  If you're looking for something even more bleeding-edge, please see the xorg-edgers PPA.

While Ubuntu does not "officially/formally" support these packages, if you discover problems when installing these debs please feel free to report bugs to launchpad.  However, please make sure to clearly state that you are running packages from this PPA so we know the fixes need to come here.

If you are upgrading from one release to another with this PPA activated, please install the ppa-purge package and use it to downgrade everything in here beforehand. sudo ppa-purge ppa:ubuntu-x-swat/x-updates will do it.

[Directions for packaging drivers can be seen at https://wiki.ubuntu.com/X/DriverBuilding]
 More info: https://launchpad.net/~ubuntu-x-swat/+archive/x-updates
Press [ENTER] to continue or ctrl-c to cancel adding it
Run Code Online (Sandbox Code Playgroud)

我想跳过确认步骤 Press [ENTER] to continue or ctrl-c to cancel adding it

如何自动确认添加 PPA?

Avi*_*Raj 7

运行命令

sudo add-apt-repository -y ppa:ubuntu-x-swat/x-updates
Run Code Online (Sandbox Code Playgroud)

添加-y上面的命令假设所有提示都是 yes,所以它不会要求你Press [ENTER] to continue or ctrl-c to cancel adding it.