table of contents
- stretch 2.21-2+b1
snap(1) | General Commands Manual | snap(1) |
NAME¶
snap - Tool to interact with snapsSYNOPSIS¶
snap [OPTIONS]DESCRIPTION¶
Install, configure, refresh and remove snap packages. Snaps are 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.
OPTIONS¶
Application Options¶
- --version
- Print the version and exit
Help Options¶
- -h, --help
- Show this help message
COMMANDS¶
abort¶
Abort a pending changeThe abort command attempts to abort a change that still has pending tasks.
Help Options¶
- -h, --help
- Show this help message
ack¶
Adds an assertion to the systemThe 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.
Help Options¶
- -h, --help
- Show this help message
alias¶
Enables the given aliasesThe 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]
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.
- --reset
- Reset the aliases to their default state, enabled for automatic aliases, disabled otherwise
Help Options¶
- -h, --help
- Show this help message
aliases¶
Lists aliases in the systemThe aliases command lists all aliases available in the system and their status.
$ snap aliases <snap>
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.
Help Options¶
- -h, --help
- Show this help message
buy¶
Buys a snapThe buy command buys a snap from the store.
Help Options¶
- -h, --help
- Show this help message
change¶
List a change's tasksThe change command displays a summary of tasks associated to an individual change.
Help Options¶
- -h, --help
- Show this help message
changes¶
List system changesThe changes command displays a summary of the recent system changes performed.
Help Options¶
- -h, --help
- Show this help message
connect¶
Connects a plug to a slotThe connect command connects a plug to a slot. It may be called in the following ways:
$ snap connect <snap>:<plug> <snap>:<slot>
Connects the provided plug to the given slot.
$ snap connect <snap>:<plug> <snap>
Connects the specific plug to the only slot in the provided snap that matches the connected interface. If more than one potential slot exists, the command fails.
$ snap connect <snap>:<plug>
Connects the provided plug to the slot in the core snap with a name matching the plug name.
Help Options¶
- -h, --help
- Show this help message
disable¶
Disables a snap in the systemThe 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.
Help Options¶
- -h, --help
- Show this help message
disconnect¶
Disconnects a plug from a slotThe disconnect command disconnects a plug from a slot. It may be called in the following ways:
$ snap disconnect <snap>:<plug> <snap>:<slot>
Disconnects the specific plug from the specific slot.
$ snap disconnect <snap>:<slot or plug>
Disconnects everything from the provided plug or slot. The snap name may be omitted for the core snap.
Help Options¶
- -h, --help
- Show this help message
download¶
Downloads the given snapThe 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]
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.- --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
Help Options¶
- -h, --help
- Show this help message
enable¶
Enables a snap in the systemThe enable command enables a snap that was previously disabled.
Help Options¶
- -h, --help
- Show this help message
find¶
Finds packages to installThe find command queries the store for available packages.
Usage: snap [OPTIONS] find [find-OPTIONS]
Finds packages to install¶
The find command queries the store for available packages.- --private
- Search private snaps
- --section
- Restrict the search to a given section
Help Options¶
- -h, --help
- Show this help message
get¶
Prints configuration optionsThe 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]
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
- -t
- Strict typing with nulls and quoted strings
- -d
- Always return document, even with single key
Help Options¶
- -h, --help
- Show this help message
help¶
HelpThe help command shows helpful information. Unlike this. ;-)
Usage: snap [OPTIONS] help [help-OPTIONS]
Help¶
The help command shows helpful information. Unlike this. ;-)- --man
- Generate the manpage
Help Options¶
- -h, --help
- Show this help message
info¶
show detailed information about a snapThe info command shows detailed information about a snap, be it by name or by path.
Usage: snap [OPTIONS] info [info-OPTIONS]
show detailed information about a snap¶
The info command shows detailed information about a snap, be it by name or by path.- --verbose
- Include a verbose list of a snap's notes (otherwise, summarise notes)
Help Options¶
- -h, --help
- Show this help message
install¶
Installs a snap to the systemThe install command installs the named snap in the system.
Usage: snap [OPTIONS] install [install-OPTIONS]
Installs a snap to the system¶
The install command installs the named snap in the system.- --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)
Help Options¶
- -h, --help
- Show this help message
interfaces¶
Lists interfaces in the systemThe interfaces command lists interfaces available in the system.
By default all slots and plugs, used and offered by all snaps, are displayed.
$ snap interfaces <snap>:<slot or plug>
Lists only the specified slot or plug.
$ snap interfaces <snap>
Lists the slots offered and plugs used by the specified snap.
$ snap interfaces -i=<interface> [<snap>]
Filters the complete output so only plugs and/or slots matching the provided details are listed.
Usage: snap [OPTIONS] interfaces [interfaces-OPTIONS]
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 <snap>:<slot or plug>
Lists only the specified slot or plug.
$ snap interfaces <snap>
Lists the slots offered and plugs used by the specified snap.
$ snap interfaces -i=<interface> [<snap>]
Filters the complete output so only plugs and/or slots matching the provided details are listed.
- -i
- Constrain listing to specific interfaces
Help Options¶
- -h, --help
- Show this help message
known¶
Shows known assertions of the provided typeThe 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 headers matching the provided values.
Usage: snap [OPTIONS] known [known-OPTIONS]
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 headers matching the provided values.- --remote
Help Options¶
- -h, --help
- Show this help message
list¶
List installed snapsThe list command displays a summary of snaps installed in the current system.
Usage: snap [OPTIONS] list [list-OPTIONS]
List installed snaps¶
The list command displays a summary of snaps installed in the current system.- --all
- Show all revisions
Help Options¶
- -h, --help
- Show this help message
login¶
Authenticates on snapd and the storeThe 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
Help Options¶
- -h, --help
- Show this help message
logout¶
Log out of the storeThis command logs the current user out of the store
Help Options¶
- -h, --help
- Show this help message
refresh¶
Refreshes a snap in the systemThe refresh command refreshes (updates) the named snap.
Usage: snap [OPTIONS] refresh [refresh-OPTIONS]
Refreshes a snap in the system¶
The refresh command refreshes (updates) the named snap.- --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
Help Options¶
- -h, --help
- Show this help message
remove¶
Removes a snap from the systemThe 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]
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.
- --revision
- Remove only the given revision
Help Options¶
- -h, --help
- Show this help message
revert¶
Reverts the given snap to the previous stateThe 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 associated with that revision, discarding any data changes that were done by the latest revision. 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]
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 associated with that revision, discarding any data changes that were done by the latest revision. As an exception, data which the snap explicitly chooses to share across revisions is not touched by the revert process.- --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
Help Options¶
- -h, --help
- Show this help message
run¶
Run the given snap commandRun the given snap command with the right confinement and environment
Usage: snap [OPTIONS] run [run-OPTIONS]
Run the given snap command¶
Run the given snap command with the right confinement and environment- --shell
- Run a shell instead of the command (useful for debugging)
Help Options¶
- -h, --help
- Show this help message
set¶
Changes configuration optionsThe 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
Help Options¶
- -h, --help
- Show this help message
try¶
Tests a snap in the systemThe 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]
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.
- --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
Help Options¶
- -h, --help
- Show this help message
unalias¶
Disables the given aliasesThe unalias command disables explicitly the given application aliases defined by the snap.
Help Options¶
- -h, --help
- Show this help message
version¶
HelpThe help command shows helpful information. Unlike this. ;-)
Help Options¶
- -h, --help
- Show this help message
watch¶
Watch a change in progressThe watch command waits for the given change-id to finish and shows progress (if available).
Help Options¶
- -h, --help
- Show this help message
26 April 2017 |