snap(1) General Commands Manual snap(1)
NAME
snap - Tool to interact with snaps
SYNOPSIS
snap [OPTIONS]
DESCRIPTION
Install, configure, refresh and remove snap packages. Snaps are enabling secure distribu‐
tion 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.
OPTIONS
--version
Print the version and exit
-h, --help
Show this help message
COMMANDS
abort
Abort a pending change
The abort command attempts to abort a change that still has pending tasks.
-h, --help
Show this help message
ack
Adds an assertion to the system
The ack command tries to add an assertion to the system assertion database.
The assertion may also be a newer revision of a preexisting assertion that it will
replace.
To succeed the assertion must be valid, its signature verified with a known public key and
the assertion consistent with and its prerequisite in the database.
-h, --help
Show this help message
alias
Enables the given aliases
The alias command enables the given application aliases defined by the snap.
Once enabled the respective application commands can be invoked just using the aliases.
Usage: snap [OPTIONS] alias [alias-OPTIONS]
--reset
Reset the aliases to their default state, enabled for automatic aliases, disabled
otherwise
-h, --help
Show this help message
aliases
Lists aliases in the system
The aliases command lists all aliases available in the system and their status.
$ snap aliases
Lists only the aliases defined by the specified snap.
An alias noted as undefined means it was explicitly enabled or disabled but is not defined
in the current revision of the snap; possibly temporarely (e.g because of a revert), if
not this can be cleared with snap alias --reset.
-h, --help
Show this help message
buy
Buys a snap
The buy command buys a snap from the store.
-h, --help
Show this help message
change
List a change's tasks
The change command displays a summary of tasks associated to an individual change.
-h, --help
Show this help message
changes
List system changes
The changes command displays a summary of the recent system changes performed.
-h, --help
Show this help message
connect
Connects a plug to a slot
The connect command connects a plug to a slot. It may be called in the following ways:
$ snap connect : :
Connects the provided plug to the given slot.
$ snap connect :
Connects the specific plug to the only slot in the provided snap that matches the con‐
nected interface. If more than one potential slot exists, the command fails.
$ snap connect :
Connects the provided plug to the slot in the core snap with a name matching the plug
name.
-h, --help
Show this help message
disable
Disables a snap in the system
The disable command disables a snap. The binaries and services of the snap will no longer
be available. But all the data is still available and the snap can easily be enabled
again.
-h, --help
Show this help message
disconnect
Disconnects a plug from a slot
The disconnect command disconnects a plug from a slot. It may be called in the following
ways:
$ snap disconnect : :
Disconnects the specific plug from the specific slot.
$ snap disconnect :
Disconnects everything from the provided plug or slot. The snap name may be omitted for
the core snap.
-h, --help
Show this help message
download
Downloads the given snap
The download command downloads the given snap and its supporting assertions to the current
directory under .snap and .assert file extensions, respectively.
Usage: snap [OPTIONS] download [download-OPTIONS]
--channel
Use this channel instead of stable
--edge Install from the edge channel
--beta Install from the beta channel
--candidate
Install from the candidate channel
--stable
Install from the stable channel
--revision
Download the given revision of a snap, to which you must have developer access
-h, --help
Show this help message
enable
Enables a snap in the system
The enable command enables a snap that was previously disabled.
-h, --help
Show this help message
find
Finds packages to install
The find command queries the store for available packages.
Usage: snap [OPTIONS] find [find-OPTIONS]
--private
Search private snaps
--section
Restrict the search to a given section
-h, --help
Show this help message
get
Prints configuration options
The get command prints configuration options for the provided snap.
$ snap get snap-name username
frank
If multiple option names are provided, a document is returned:
$ snap get snap-name username password
{
"username": "frank",
"password": "..."
}
Nested values may be retrieved via a dotted path:
$ snap get snap-name author.name
frank
Usage: snap [OPTIONS] get [get-OPTIONS]
-t Strict typing with nulls and quoted strings
-d Always return document, even with single key
-h, --help
Show this help message
help
Help
The help command shows helpful information. Unlike this. ;-)
Usage: snap [OPTIONS] help [help-OPTIONS]
--man Generate the manpage
-h, --help
Show this help message
info
show detailed information about a snap
The info command shows detailed information about a snap, be it by name or by path.
Usage: snap [OPTIONS] info [info-OPTIONS]
--verbose
Include a verbose list of a snap's notes (otherwise, summarise notes)
-h, --help
Show this help message
install
Installs a snap to the system
The install command installs the named snap in the system.
Usage: snap [OPTIONS] install [install-OPTIONS]
--channel
Use this channel instead of stable
--edge Install from the edge channel
--beta Install from the beta channel
--candidate
Install from the candidate channel
--stable
Install from the stable channel
--devmode
Put snap in development mode and disable security confinement
--jailmode
Put snap in enforced confinement mode
--classic
Put snap in classic mode and disable security confinement
--revision
Install the given revision of a snap, to which you must have developer access
--dangerous
Install the given snap file even if there are no pre-acknowledged signatures for
it, meaning it was not verified and could be dangerous (--devmode implies this)
-h, --help
Show this help message
interfaces
Lists interfaces in the system
The interfaces command lists interfaces available in the system.
By default all slots and plugs, used and offered by all snaps, are displayed.
$ snap interfaces :
Lists only the specified slot or plug.
$ snap interfaces
Lists the slots offered and plugs used by the specified snap.
$ snap interfaces -i= []
Filters the complete output so only plugs and/or slots matching the provided details are
listed.
Usage: snap [OPTIONS] interfaces [interfaces-OPTIONS]
-i
Constrain listing to specific interfaces
-h, --help
Show this help message
known
Shows known assertions of the provided type
The known command shows known assertions of the provided type. If header=value pairs are
provided after the assertion type, the assertions shown must also have the specified head‐
ers matching the provided values.
Usage: snap [OPTIONS] known [known-OPTIONS]
--remote
-h, --help
Show this help message
list
List installed snaps
The list command displays a summary of snaps installed in the current system.
Usage: snap [OPTIONS] list [list-OPTIONS]
--all Show all revisions
-h, --help
Show this help message
login
Authenticates on snapd and the store
The login command authenticates on snapd and the snap store and saves credentials into the
~/.snap/auth.json file. Further communication with snapd will then be made using those
credentials.
Login only works for local users in the sudo, admin or wheel groups.
An account can be setup at https://login.ubuntu.com
-h, --help
Show this help message
logout
Log out of the store
This command logs the current user out of the store
-h, --help
Show this help message
refresh
Refreshes a snap in the system
The refresh command refreshes (updates) the named snap.
Usage: snap [OPTIONS] refresh [refresh-OPTIONS]
--channel
Use this channel instead of stable
--edge Install from the edge channel
--beta Install from the beta channel
--candidate
Install from the candidate channel
--stable
Install from the stable channel
--devmode
Put snap in development mode and disable security confinement
--jailmode
Put snap in enforced confinement mode
--classic
Put snap in classic mode and disable security confinement
--revision
Refresh to the given revision
--list Show available snaps for refresh
--ignore-validation
Ignore validation by other snaps blocking the refresh
-h, --help
Show this help message
remove
Removes a snap from the system
The remove command removes the named snap from the system.
By default all the snap revisions are removed, including their data and the common data
directory. When a --revision option is passed only the specified revision is removed.
Usage: snap [OPTIONS] remove [remove-OPTIONS]
--revision
Remove only the given revision
-h, --help
Show this help message
revert
Reverts the given snap to the previous state
The revert command reverts the given snap to its state before the latest refresh. This
will reactivate the previous snap revision, and will use the original data that was asso‐
ciated with that revision, discarding any data changes that were done by the latest revi‐
sion. As an exception, data which the snap explicitly chooses to share across revisions is
not touched by the revert process.
Usage: snap [OPTIONS] revert [revert-OPTIONS]
--devmode
Put snap in development mode and disable security confinement
--jailmode
Put snap in enforced confinement mode
--classic
Put snap in classic mode and disable security confinement
--revision
Revert to the given revision
-h, --help
Show this help message
run
Run the given snap command
Run the given snap command with the right confinement and environment
Usage: snap [OPTIONS] run [run-OPTIONS]
--shell
Run a shell instead of the command (useful for debugging)
-h, --help
Show this help message
set
Changes configuration options
The set command changes the provided configuration options as requested.
$ snap set snap-name username=frank password=$PASSWORD
All configuration changes are persisted at once, and only after the snap's configuration
hook returns successfully.
Nested values may be modified via a dotted path:
$ snap set author.name=frank
-h, --help
Show this help message
try
Tests a snap in the system
The try command installs an unpacked snap into the system for testing purposes. The
unpacked snap content continues to be used even after installation, so non-metadata
changes there go live instantly. Metadata changes such as those performed in snap.yaml
will require reinstallation to go live.
If snap-dir argument is omitted, the try command will attempt to infer it if either
snapcraft.yaml file and prime directory or meta/snap.yaml file can be found relative to
current working directory.
Usage: snap [OPTIONS] try [try-OPTIONS]
--devmode
Put snap in development mode and disable security confinement
--jailmode
Put snap in enforced confinement mode
--classic
Put snap in classic mode and disable security confinement
-h, --help
Show this help message
unalias
Disables the given aliases
The unalias command disables explicitly the given application aliases defined by the snap.
-h, --help
Show this help message
version
Help
The help command shows helpful information. Unlike this. ;-)
-h, --help
Show this help message
watch
Watch a change in progress
The watch command waits for the given change-id to finish and shows progress (if avail‐
able).
-h, --help
Show this help message
14 January 2017 snap(1)
Go-to-top