大家好,我是paul,今天我来简单的分享一下在centos7上搭建snapd跟一些常用的命令
具体方法我来一一的来详解,首先我们需要两个插件,是COPR跟EPEL,通过存储库EPEL来安装COPR yum插件,来启动,现在我来演示一下
sudo yum install epel-release
这里输入y
输入y
sudo yum install yum-plugin-copr
输入y进行下一步
现在我们添加完存储库后,进行下一步安装snapd软件包
sudo yum -y install snapd
等待完成安装后我们来启动服务
出现这个说明snapd socket我们启动成功
下一步我们需要从/snap到/var/lib/snapd/snap符号连接下面的snaps或者说是/snap,为这个重新建立一个符号链接,
sudo ln -s /var/lib/snapd/snap /snap
没有提示往往是最好的提示,说明没有问题
到这一步,snapd算是安装完成了,下面我分享下用法跟一些常用参数
<command> [<options>...]
Install, configure, refresh and remove snap packages. Snaps are 'universal' packages that work across many different Linux systems,enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of snaps on the system. Start with 'snap list' to see installed snaps.
应用选项:
--version——打印版本并退出
帮助选项:
-h, --help——显示此帮助消息
可用的命令:
abort——中止待定更改
ack——Adds an assertion to the system
alias——Sets up a manual alias
aliases——Lists aliases in the system
buy——Buys a snap
changes——List system changes
connect——Connects a plug to a slot
disable——Disables a snap in the system
disconnect——Disconnects a plug from a slot
download——Downloads the given snap
enable——Enables a snap in the system
find——Finds packages to install (aliases: search)
get——Prints configuration options
help——帮助
info——show detailed information about a snap
install——Installs a snap to the system
interface——Lists snap interfaces
interfaces——Lists interfaces in the system
known——Shows known assertions of the provided type
list——List installed snaps
login——Authenticates on snapd and the store
logout——Log out of the store
logs——Retrieve logs of services
pack——pack the given target dir as a snap
prefer——Prefer aliases from a snap and disable conflicts
refresh——Refreshes a snap in the system
remove——Removes a snap from the system
restart——Restart services
revert——Reverts the given snap to the previous state
run——Run the given snap command
services——Query the status of services
set——Changes configuration options
start——Start services
stop——Stop services
switch——Switches snap to a different channel
tasks——List a change's tasks (aliases: change)
try——Tests a snap in the system
unalias——Unalias a manual alias or an entire snap
version ——Shows version details
watch——Watch a change in progress
whoami——Prints the email the user is logged in with.
你可能喜欢