1snap(8) System Manager's Manual snap(8)
2
3
4
6 snap - Tool to interact with snaps
7
9 snap [OPTIONS]
10
12 The snap command lets you install, configure, refresh and remove snaps.
13 Snaps are packages that work across many different Linux distributions,
14 enabling secure delivery and operation of the latest apps and utili‐
15 ties.
16
19 abort
20 Abort a pending change
21
22 The abort command attempts to abort a change that still has pending
23 tasks.
24
25 Usage: snap [OPTIONS] abort [abort-OPTIONS]
26
27 --last Select last change of given type (install, refresh, remove, try,
28 auto-refresh, etc.). A question mark at the end of the type
29 means to do nothing (instead of returning an error) if no change
30 of the given type is found. Note the question mark could need
31 protecting from the shell.
32
33 ack
34 Add an assertion to the system
35
36 The ack command tries to add an assertion to the system assertion data‐
37 base.
38
39 The assertion may also be a newer revision of a pre-existing assertion
40 that it will replace.
41
42 To succeed the assertion must be valid, its signature verified with a
43 known public key and the assertion consistent with and its prerequisite
44 in the database.
45
46 alias
47 Set up a manual alias
48
49 The alias command aliases the given snap application to the given
50 alias.
51
52 Once this manual alias is setup the respective application command can
53 be invoked just using the alias.
54
55 Usage: snap [OPTIONS] alias [alias-OPTIONS]
56
57 --no-wait
58 Do not wait for the operation to finish but just print the
59 change id.
60
61 aliases
62 List aliases in the system
63
64 The aliases command lists all aliases available in the system and their
65 status.
66
67 $ snap aliases <snap>
68
69 Lists only the aliases defined by the specified snap.
70
71 An alias noted as undefined means it was explicitly enabled or disabled
72 but is not defined in the current revision of the snap, possibly tempo‐
73 rarily (e.g. because of a revert). This can cleared with 'snap alias
74 --reset'.
75
76 changes
77 List system changes
78
79 The changes command displays a summary of system changes performed re‐
80 cently.
81
82 Usage: snap [OPTIONS] changes [changes-OPTIONS]
83
84 --abs-time
85 Display absolute times (in RFC 3339 format). Otherwise, display
86 relative times up to 60 days, then YYYY-MM-DD.
87
88 check-snapshot
89 Check a snapshot
90
91 The check-snapshot command verifies the user, system and configuration
92 data of the snaps included in the specified snapshot.
93
94 The check operation runs the same data integrity verification that is
95 performed when a snapshot is restored.
96
97 By default, this command checks all the data in a snapshot. Alterna‐
98 tively, you can specify the data of which snaps to check, or for which
99 users, or a combination of these.
100
101 If a snap is included in a check-snapshot operation, excluding its sys‐
102 tem and configuration data from the check is not currently possible.
103 This restriction may be lifted in the future.
104
105 Usage: snap [OPTIONS] check-snapshot [check-snapshot-OPTIONS]
106
107 --no-wait
108 Do not wait for the operation to finish but just print the
109 change id.
110
111 --users
112 Check data of only specific users (comma-separated) (default:
113 all users)
114
115 connect
116 Connect a plug to a slot
117
118 The connect command connects a plug to a slot. It may be called in the
119 following ways:
120
121 $ snap connect <snap>:<plug> <snap>:<slot>
122
123 Connects the provided plug to the given slot.
124
125 $ snap connect <snap>:<plug> <snap>
126
127 Connects the specific plug to the only slot in the provided snap that
128 matches the connected interface. If more than one potential slot ex‐
129 ists, the command fails.
130
131 $ snap connect <snap>:<plug>
132
133 Connects the provided plug to the slot in the core snap with a name
134 matching the plug name.
135
136 Usage: snap [OPTIONS] connect [connect-OPTIONS]
137
138 --no-wait
139 Do not wait for the operation to finish but just print the
140 change id.
141
142 connections
143 List interface connections
144
145 The connections command lists connections between plugs and slots in
146 the system.
147
148 Unless <snap> is provided, the listing is for connected plugs and slots
149 for all snaps in the system. In this mode, pass --all to also list un‐
150 connected plugs and slots.
151
152 $ snap connections <snap>
153
154 Lists connected and unconnected plugs and slots for the specified snap.
155
156 Usage: snap [OPTIONS] connections [connections-OPTIONS]
157
158 --all Show connected and unconnected plugs and slots
159
160 create-cohort
161 Create cohort keys for a set of snaps
162
163 The create-cohort command creates a set of cohort keys for a given set
164 of snaps.
165
166 A cohort is a view or snapshot of a snap's "channel map" at a given
167 point in time that fixes the set of revisions for the snap given other
168 constraints (e.g. channel or architecture). The cohort is then identi‐
169 fied by an opaque per-snap key that works across systems. Installations
170 or refreshes of the snap using a given cohort key would use a fixed re‐
171 vision for up to 90 days, after which a new set of revisions would be
172 fixed under that same cohort key and a new 90 days window started.
173
174 debug
175 Run debug commands
176
177
178 The debug command contains a selection of additional sub-commands.
179
180 Debug commands can be removed without notice and may not work on non-
181 development systems.
182
183
184 debug confinement
185 Print the confinement mode the system operates in
186
187 The confinement command will print the confinement mode (strict, par‐
188 tial or none) the system operates in.
189
190 debug connectivity
191 Check network connectivity status
192
193 The connectivity command checks the network connectivity of snapd.
194
195 debug paths
196 Print system paths
197
198 The paths command prints the list of paths detected and used by snapd.
199
200 debug sandbox-features
201 Print sandbox features available on the system
202
203 The sandbox command prints tags describing features of individual sand‐
204 box components used by snapd on a given system.
205
206 Usage: snap [OPTIONS] debug sandbox-features [sandbox-features-OPTIONS]
207
208 --required
209 Ensure that given backend:feature is available
210
211 debug stacktraces
212 Obtain stacktraces of all snapd goroutines
213
214 Obtain stacktraces of all snapd goroutines.
215
216 debug state
217 Inspect a snapd state file.
218
219 Inspect a snapd state file, bypassing snapd API.
220
221 Usage: snap [OPTIONS] debug state [state-OPTIONS]
222
223 --abs-time
224 Display absolute times (in RFC 3339 format). Otherwise, display
225 relative times up to 60 days, then YYYY-MM-DD.
226
227 --changes
228 List all changes
229
230 --task ID of the task to inspect
231
232 --change
233 ID of the change to inspect
234
235 --is-seeded
236 Output seeding status (true or false)
237
238 --dot Dot (graphviz) output
239
240 --no-hold
241 Omit tasks in 'Hold' state in the change output
242
243 debug timings
244 Get the timings of the tasks of a change
245
246 The timings command displays details about the time each task runs.
247
248 Usage: snap [OPTIONS] debug timings [timings-OPTIONS]
249
250 --last Select last change of given type (install, refresh, remove, try,
251 auto-refresh, etc.). A question mark at the end of the type
252 means to do nothing (instead of returning an error) if no change
253 of the given type is found. Note the question mark could need
254 protecting from the shell.
255
256 --ensure
257 Show timings for a change related to the given Ensure activity
258 (one of: auto-refresh, become-operational, refresh-catalogs, re‐
259 fresh-hints, seed)
260
261 --all Show timings for all executions of the given Ensure or startup
262 activity, not just the latest
263
264 --startup
265 Show timings for the startup of given subsystem (one of: load-
266 state, ifacemgr)
267
268 --verbose
269 Show more information
270
271 disable
272 Disable a snap in the system
273
274 The disable command disables a snap. The binaries and services of the
275 snap will no longer be available, but all the data is still available
276 and the snap can easily be enabled again.
277
278 Usage: snap [OPTIONS] disable [disable-OPTIONS]
279
280 --no-wait
281 Do not wait for the operation to finish but just print the
282 change id.
283
284 disconnect
285 Disconnect a plug from a slot
286
287 The disconnect command disconnects a plug from a slot. It may be
288 called in the following ways:
289
290 $ snap disconnect <snap>:<plug> <snap>:<slot>
291
292 Disconnects the specific plug from the specific slot.
293
294 $ snap disconnect <snap>:<slot or plug>
295
296 Disconnects everything from the provided plug or slot. The snap name
297 may be omitted for the core snap.
298
299 When an automatic connection is manually disconnected, its disconnected
300 state is retained after a snap refresh. The --forget flag can be added
301 to the disconnect command to reset this behaviour, and consequently re-
302 enable an automatic reconnection after a snap refresh.
303
304 Usage: snap [OPTIONS] disconnect [disconnect-OPTIONS]
305
306 --no-wait
307 Do not wait for the operation to finish but just print the
308 change id.
309
310 --forget
311 Forget remembered state about the given connection.
312
313 download
314 Download the given snap
315
316 The download command downloads the given snap and its supporting asser‐
317 tions to the current directory with .snap and .assert file extensions,
318 respectively.
319
320 Usage: snap [OPTIONS] download [download-OPTIONS]
321
322 --channel
323 Use this channel instead of stable
324
325 --edge Install from the edge channel
326
327 --beta Install from the beta channel
328
329 --candidate
330 Install from the candidate channel
331
332 --stable
333 Install from the stable channel
334
335 --revision
336 Download the given revision of a snap, to which you must have
337 developer access
338
339 --basename
340 Use this basename for the snap and assertion files (defaults to
341 <snap>_<revision>)
342
343 --target-directory
344 Download to this directory (defaults to the current directory)
345
346 --cohort
347 Download from the given cohort
348
349 enable
350 Enable a snap in the system
351
352 The enable command enables a snap that was previously disabled.
353
354 Usage: snap [OPTIONS] enable [enable-OPTIONS]
355
356 --no-wait
357 Do not wait for the operation to finish but just print the
358 change id.
359
360 export-snapshot
361 Export a snapshot
362
363 Export a snapshot to the given filename.
364
365 find
366 Find packages to install
367
368 The find command queries the store for available packages.
369
370 With the --private flag, which requires the user to be logged-in to the
371 store (see 'snap help login'), it instead searches for private snaps
372 that the user has developer access to, either directly or through the
373 store's collaboration feature.
374
375 A green check mark (given color and unicode support) after a publisher
376 name indicates that the publisher has been verified.
377
378 Usage: snap [OPTIONS] find [find-OPTIONS]
379
380
381 Aliases: search
382
383
384 --private
385 Search private snaps.
386
387 --narrow
388 Only search for snaps in “stable”.
389
390 --section [="show-all-sections-please"] <default: "no-section-speci‐
391 fied">
392 Restrict the search to a given section.
393
394 --color <default: "auto">
395 Use a little bit of color to highlight some things.
396
397 --unicode <default: "auto">
398 Use a little bit of Unicode to improve legibility.
399
400 forget
401 Delete a snapshot
402
403 The forget command deletes a snapshot. This operation can not be un‐
404 done.
405
406 A snapshot contains archives for the user, system and configuration
407 data of each snap included in the snapshot.
408
409 By default, this command forgets all the data in a snapshot. Alterna‐
410 tively, you can specify the data of which snaps to forget.
411
412 Usage: snap [OPTIONS] forget [forget-OPTIONS]
413
414 --no-wait
415 Do not wait for the operation to finish but just print the
416 change id.
417
418 get
419 Print configuration options
420
421 The get command prints configuration options for the provided snap.
422
423 $ snap get snap-name username
424 frank
425
426 If multiple option names are provided, the corresponding values are re‐
427 turned:
428
429 $ snap get snap-name username password
430 Key Value
431 username frank
432 password ...
433
434 Nested values may be retrieved via a dotted path:
435
436 $ snap get snap-name author.name
437 frank
438
439 Usage: snap [OPTIONS] get [get-OPTIONS]
440
441 -t Strict typing with nulls and quoted strings
442
443 -d Always return document, even with single key
444
445 -l Always return list, even with single key
446
447 help
448 Show help about a command
449
450 The help command displays information about snap commands.
451
452 Usage: snap [OPTIONS] help [help-OPTIONS]
453
454 --all Show a short summary of all commands
455
456 import-snapshot
457 Import a snapshot
458
459 Import an exported snapshot set to the system. The snapshot is imported
460 with a new snapshot ID and can be restored using the restore command.
461
462 Usage: snap [OPTIONS] import-snapshot [import-snapshot-OPTIONS]
463
464 --abs-time
465
466 info
467 Show detailed information about snaps
468
469 The info command shows detailed information about snaps.
470
471 The snaps can be specified by name or by path; names are looked for
472 both in the store and in the installed snaps; paths can refer to a
473 .snap file, or to a directory that contains an unpacked snap suitable
474 for 'snap try' (an example of this would be the 'prime' directory
475 snapcraft produces).
476
477 Usage: snap [OPTIONS] info [info-OPTIONS]
478
479 --color <default: "auto">
480 Use a little bit of color to highlight some things.
481
482 --unicode <default: "auto">
483 Use a little bit of Unicode to improve legibility.
484
485 --abs-time
486 Display absolute times (in RFC 3339 format). Otherwise, display
487 relative times up to 60 days, then YYYY-MM-DD.
488
489 --verbose
490 Include more details on the snap (expanded notes, base, etc.)
491
492 install
493 Install snaps on the system
494
495 The install command installs the named snaps on the system.
496
497 To install multiple instances of the same snap, append an underscore
498 and a unique identifier (for each instance) to a snap's name.
499
500 With no further options, the snaps are installed tracking the stable
501 channel, with strict security confinement.
502
503 Revision choice via the --revision override requires the user to have
504 developer access to the snap, either directly or through the store's
505 collaboration feature, and to be logged in (see 'snap help login').
506
507 Note that a later refresh will typically undo a revision override, tak‐
508 ing the snap back to the current revision of the channel it's tracking.
509
510 Use --name to set the instance name when installing from snap file.
511
512 Usage: snap [OPTIONS] install [install-OPTIONS]
513
514 --color <default: "auto">
515 Use a little bit of color to highlight some things.
516
517 --unicode <default: "auto">
518 Use a little bit of Unicode to improve legibility.
519
520 --no-wait
521 Do not wait for the operation to finish but just print the
522 change id.
523
524 --channel
525 Use this channel instead of stable
526
527 --edge Install from the edge channel
528
529 --beta Install from the beta channel
530
531 --candidate
532 Install from the candidate channel
533
534 --stable
535 Install from the stable channel
536
537 --devmode
538 Put snap in development mode and disable security confinement
539
540 --jailmode
541 Put snap in enforced confinement mode
542
543 --classic
544 Put snap in classic mode and disable security confinement
545
546 --revision
547 Install the given revision of a snap, to which you must have de‐
548 veloper access
549
550 --dangerous
551 Install the given snap file even if there are no pre-acknowl‐
552 edged signatures for it, meaning it was not verified and could
553 be dangerous (--devmode implies this)
554
555 --unaliased
556 Install the given snap without enabling its automatic aliases
557
558 --name Install the snap file under the given instance name
559
560 --cohort
561 Install the snap in the given cohort
562
563 interface
564 Show details of snap interfaces
565
566 The interface command shows details of snap interfaces.
567
568 If no interface name is provided, a list of interface names with at
569 least one connection is shown, or a list of all interfaces if --all is
570 provided.
571
572 Usage: snap [OPTIONS] interface [interface-OPTIONS]
573
574 --attrs
575 Show interface attributes
576
577 --all Include unused interfaces
578
579 known
580 Show known assertions of the provided type
581
582 The known command shows known assertions of the provided type. If
583 header=value pairs are provided after the assertion type, the asser‐
584 tions shown must also have the specified headers matching the provided
585 values.
586
587 Usage: snap [OPTIONS] known [known-OPTIONS]
588
589 --remote
590 Query the store for the assertion, via snapd if possible
591
592 --direct
593 Query the store for the assertion, without attempting to go via
594 snapd
595
596 list
597 List installed snaps
598
599 The list command displays a summary of snaps installed in the current
600 system.
601
602 A green check mark (given color and unicode support) after a publisher
603 name indicates that the publisher has been verified.
604
605 Usage: snap [OPTIONS] list [list-OPTIONS]
606
607 --all Show all revisions
608
609 --color <default: "auto">
610 Use a little bit of color to highlight some things.
611
612 --unicode <default: "auto">
613 Use a little bit of Unicode to improve legibility.
614
615 login
616 Authenticate to snapd and the store
617
618 The login command authenticates the user to snapd and the snap store,
619 and saves credentials into the ~/.snap/auth.json file. Further communi‐
620 cation with snapd will then be made using those credentials.
621
622 It's not necessary to log in to interact with snapd. Doing so, however,
623 enables purchasing of snaps using 'snap buy', as well as some some de‐
624 veloper-oriented features as detailed in the help for the find, install
625 and refresh commands.
626
627 An account can be set up at https://login.ubuntu.com
628
629 logout
630 Log out of snapd and the store
631
632 The logout command logs the current user out of snapd and the store.
633
634 logs
635 Retrieve logs for services
636
637 The logs command fetches logs of the given services and displays them
638 in chronological order.
639
640 Usage: snap [OPTIONS] logs [logs-OPTIONS]
641
642 -n <default: "10">
643 Show only the given number of lines, or 'all'.
644
645 -f Wait for new lines and print them as they come in.
646
647 model
648 Get the active model for this device
649
650 The model command returns the active model assertion information for
651 this device.
652
653 By default, only the essential model identification information is in‐
654 cluded in the output, but this can be expanded to include all of an as‐
655 sertion's non-meta headers.
656
657 The verbose output is presented in a structured, yaml-like format.
658
659 Similarly, the active serial assertion can be used for the output in‐
660 stead of the model assertion.
661
662 Usage: snap [OPTIONS] model [model-OPTIONS]
663
664 --abs-time
665 Display absolute times (in RFC 3339 format). Otherwise, display
666 relative times up to 60 days, then YYYY-MM-DD.
667
668 --color <default: "auto">
669 Use a little bit of color to highlight some things.
670
671 --unicode <default: "auto">
672 Use a little bit of Unicode to improve legibility.
673
674 --serial
675 Print the serial assertion instead of the model assertion.
676
677 --verbose
678 Print all specific assertion fields.
679
680 --assertion
681 Print the raw assertion.
682
683 okay
684 Acknowledge warnings
685
686 The okay command acknowledges the warnings listed with 'snap warnings'.
687
688 Once acknowledged a warning won't appear again unless it re-occurrs and
689 sufficient time has passed.
690
691 pack
692 Pack the given directory as a snap
693
694 The pack command packs the given snap-dir as a snap and writes the re‐
695 sult to target-dir. If target-dir is omitted, the result is written to
696 current directory. If both source-dir and target-dir are omitted, the
697 pack command packs the current directory.
698
699 The default file name for a snap can be derived entirely from its
700 snap.yaml, but in some situations it's simpler for a script to feed the
701 filename in. In those cases, --filename can be given to override the
702 default. If this filename is not absolute it will be taken as relative
703 to target-dir.
704
705 When used with --check-skeleton, pack only checks whether snap-dir con‐
706 tains valid snap metadata and raises an error otherwise. Application
707 commands listed in snap metadata file, but appearing with incorrect
708 permission bits result in an error. Commands that are missing from
709 snap-dir are listed in diagnostic messages.
710
711 Usage: snap [OPTIONS] pack [pack-OPTIONS]
712
713 --check-skeleton
714 Validate snap-dir metadata only
715
716 --filename
717 Output to this filename
718
719 --compression
720 Compression to use (e.g. xz or lzo)
721
722 prefer
723 Enable aliases from a snap, disabling any conflicting aliases
724
725 The prefer command enables all aliases of the given snap in preference
726 to conflicting aliases of other snaps whose aliases will be disabled
727 (or removed, for manual ones).
728
729 Usage: snap [OPTIONS] prefer [prefer-OPTIONS]
730
731 --no-wait
732 Do not wait for the operation to finish but just print the
733 change id.
734
735 prepare-image
736 Prepare a device image
737
738 The prepare-image command performs some of the steps necessary for cre‐
739 ating device images.
740
741 For core images it is not invoked directly but usually via ubuntu-im‐
742 age.
743
744 For preparing classic images it supports a --classic mode
745
746 Usage: snap [OPTIONS] prepare-image [prepare-image-OPTIONS]
747
748 --classic
749 Enable classic mode to prepare a classic model image
750
751 --arch Specify an architecture for snaps for --classic when the model
752 does not
753
754 --channel
755 The channel to use
756
757 --snap <snap>[=<channel>]
758 Include the given snap from the store or a local file and/or
759 specify the channel to track for the given snap
760
761 reboot
762 Reboot into selected system and mode
763
764 The reboot command reboots the system into a particular mode of the se‐
765 lected recovery system.
766
767 When called without a system label and without a mode it will just
768 trigger a regular reboot.
769
770 When called without a system label but with a mode it will use the cur‐
771 rent system to enter the given mode.
772
773 Note that "recover" and "run" modes are only available for the current
774 system.
775
776 Usage: snap [OPTIONS] reboot [reboot-OPTIONS]
777
778 --run Boot into run mode
779
780 --install
781 Boot into install mode
782
783 --recover
784 Boot into recover mode
785
786 recovery
787 List available recovery systems
788
789 The recovery command lists the available recovery systems.
790
791 With --show-keys it displays recovery keys that can be used to unlock
792 the encrypted partitions if the device-specific automatic unlocking
793 does not work.
794
795 Usage: snap [OPTIONS] recovery [recovery-OPTIONS]
796
797 --color <default: "auto">
798 Use a little bit of color to highlight some things.
799
800 --unicode <default: "auto">
801 Use a little bit of Unicode to improve legibility.
802
803 --show-keys
804 Show recovery keys (if available) to unlock encrypted parti‐
805 tions.
806
807 refresh
808 Refresh snaps in the system
809
810 The refresh command updates the specified snaps, or all snaps in the
811 system if none are specified.
812
813 With no further options, the snaps are refreshed to the current revi‐
814 sion of the channel they're tracking, preserving their confinement op‐
815 tions.
816
817 Revision choice via the --revision override requires the user to have
818 developer access to the snap, either directly or through the store's
819 collaboration feature, and to be logged in (see 'snap help login').
820
821 Note a later refresh will typically undo a revision override.
822
823 Usage: snap [OPTIONS] refresh [refresh-OPTIONS]
824
825 --color <default: "auto">
826 Use a little bit of color to highlight some things.
827
828 --unicode <default: "auto">
829 Use a little bit of Unicode to improve legibility.
830
831 --abs-time
832 Display absolute times (in RFC 3339 format). Otherwise, display
833 relative times up to 60 days, then YYYY-MM-DD.
834
835 --no-wait
836 Do not wait for the operation to finish but just print the
837 change id.
838
839 --channel
840 Use this channel instead of stable
841
842 --edge Install from the edge channel
843
844 --beta Install from the beta channel
845
846 --candidate
847 Install from the candidate channel
848
849 --stable
850 Install from the stable channel
851
852 --devmode
853 Put snap in development mode and disable security confinement
854
855 --jailmode
856 Put snap in enforced confinement mode
857
858 --classic
859 Put snap in classic mode and disable security confinement
860
861 --amend
862 Allow refresh attempt on snap unknown to the store
863
864 --revision
865 Refresh to the given revision, to which you must have developer
866 access
867
868 --cohort
869 Refresh the snap into the given cohort
870
871 --leave-cohort
872 Refresh the snap out of its cohort
873
874 --list Show the new versions of snaps that would be updated with the
875 next refresh
876
877 --time Show auto refresh information but do not perform a refresh
878
879 --ignore-validation
880 Ignore validation by other snaps blocking the refresh
881
882 remove
883 Remove snaps from the system
884
885 The remove command removes the named snap instance from the system.
886
887 By default all the snap revisions are removed, including their data and
888 the common data directory. When a --revision option is passed only the
889 specified revision is removed.
890
891 Unless automatic snapshots are disabled, a snapshot of all data for the
892 snap is saved upon removal, which is then available for future restora‐
893 tion with snap restore. The --purge option disables automatically cre‐
894 ating snapshots.
895
896 Usage: snap [OPTIONS] remove [remove-OPTIONS]
897
898 --no-wait
899 Do not wait for the operation to finish but just print the
900 change id.
901
902 --revision
903 Remove only the given revision
904
905 --purge
906 Remove the snap without saving a snapshot of its data
907
908 restart
909 Restart services
910
911 The restart command restarts the given services.
912
913 If the --reload option is given, for each service whose app has a
914 reload command, a reload is performed instead of a restart.
915
916 Usage: snap [OPTIONS] restart [restart-OPTIONS]
917
918 --no-wait
919 Do not wait for the operation to finish but just print the
920 change id.
921
922 --reload
923 If the service has a reload command, use it instead of restart‐
924 ing.
925
926 restore
927 Restore a snapshot
928
929 The restore command replaces the current user, system and configuration
930 data of included snaps, with the corresponding data from the specified
931 snapshot.
932
933 By default, this command restores all the data in a snapshot. Alterna‐
934 tively, you can specify the data of which snaps to restore, or for
935 which users, or a combination of these.
936
937 If a snap is included in a restore operation, excluding its system and
938 configuration data from the restore is not currently possible. This re‐
939 striction may be lifted in the future.
940
941 Usage: snap [OPTIONS] restore [restore-OPTIONS]
942
943 --no-wait
944 Do not wait for the operation to finish but just print the
945 change id.
946
947 --users
948 Restore data of only specific users (comma-separated) (default:
949 all users)
950
951 revert
952 Reverts the given snap to the previous state
953
954 The revert command reverts the given snap to its state before the lat‐
955 est refresh. This will reactivate the previous snap revision, and will
956 use the original data that was associated with that revision, discard‐
957 ing any data changes that were done by the latest revision. As an ex‐
958 ception, data which the snap explicitly chooses to share across revi‐
959 sions is not touched by the revert process.
960
961 Usage: snap [OPTIONS] revert [revert-OPTIONS]
962
963 --no-wait
964 Do not wait for the operation to finish but just print the
965 change id.
966
967 --devmode
968 Put snap in development mode and disable security confinement
969
970 --jailmode
971 Put snap in enforced confinement mode
972
973 --classic
974 Put snap in classic mode and disable security confinement
975
976 --revision
977 Revert to the given revision
978
979 run
980 Run the given snap command
981
982 The run command executes the given snap command with the right confine‐
983 ment and environment.
984
985 Usage: snap [OPTIONS] run [run-OPTIONS]
986
987 --shell
988 Run a shell instead of the command (useful for debugging)
989
990 --strace [="with-strace"] <default: "no-strace">
991 Run the command under strace (useful for debugging). Extra
992 strace options can be specified as well here. Pass --raw to
993 strace early snap helpers.
994
995 --gdbserver [=":0"] <default: "no-gdbserver">
996 Run the command with gdbserver
997
998 --trace-exec
999 Display exec calls timing data
1000
1001 save
1002 Save a snapshot of the current data
1003
1004 The save command creates a snapshot of the current user, system and
1005 configuration data for the given snaps.
1006
1007 By default, this command saves the data of all snaps for all users.
1008 Alternatively, you can specify the data of which snaps to save, or for
1009 which users, or a combination of these.
1010
1011 If a snap is included in a save operation, excluding its system and
1012 configuration data from the snapshot is not currently possible. This
1013 restriction may be lifted in the future.
1014
1015 Usage: snap [OPTIONS] save [save-OPTIONS]
1016
1017 --no-wait
1018 Do not wait for the operation to finish but just print the
1019 change id.
1020
1021 --abs-time
1022 Display absolute times (in RFC 3339 format). Otherwise, display
1023 short relative times.
1024
1025 --users
1026 Snapshot data of only specific users (comma-separated) (default:
1027 all users)
1028
1029 saved
1030 List currently stored snapshots
1031
1032 The saved command displays a list of snapshots that have been created
1033 previously with the 'save' command.
1034
1035 Usage: snap [OPTIONS] saved [saved-OPTIONS]
1036
1037 --abs-time
1038 Display absolute times (in RFC 3339 format). Otherwise, display
1039 short relative times.
1040
1041 --id Show only a specific snapshot.
1042
1043 services
1044 Query the status of services
1045
1046 The services command lists information about the services specified, or
1047 about the services in all currently installed snaps.
1048
1049 set
1050 Change configuration options
1051
1052 The set command changes the provided configuration options as re‐
1053 quested.
1054
1055 $ snap set snap-name username=frank password=$PASSWORD
1056
1057 All configuration changes are persisted at once, and only after the
1058 snap's configuration hook returns successfully.
1059
1060 Nested values may be modified via a dotted path:
1061
1062 $ snap set snap-name author.name=frank
1063
1064 Configuration option may be unset with exclamation mark:
1065 $ snap set snap-name author!
1066
1067 Usage: snap [OPTIONS] set [set-OPTIONS]
1068
1069 --no-wait
1070 Do not wait for the operation to finish but just print the
1071 change id.
1072
1073 start
1074 Start services
1075
1076 The start command starts, and optionally enables, the given services.
1077
1078 Usage: snap [OPTIONS] start [start-OPTIONS]
1079
1080 --no-wait
1081 Do not wait for the operation to finish but just print the
1082 change id.
1083
1084 --enable
1085 As well as starting the service now, arrange for it to be
1086 started on boot.
1087
1088 stop
1089 Stop services
1090
1091 The stop command stops, and optionally disables, the given services.
1092
1093 Usage: snap [OPTIONS] stop [stop-OPTIONS]
1094
1095 --no-wait
1096 Do not wait for the operation to finish but just print the
1097 change id.
1098
1099 --disable
1100 As well as stopping the service now, arrange for it to no longer
1101 be started on boot.
1102
1103 switch
1104 Switches snap to a different channel
1105
1106 The switch command switches the given snap to a different channel with‐
1107 out doing a refresh.
1108
1109 Usage: snap [OPTIONS] switch [switch-OPTIONS]
1110
1111 --no-wait
1112 Do not wait for the operation to finish but just print the
1113 change id.
1114
1115 --channel
1116 Use this channel instead of stable
1117
1118 --edge Install from the edge channel
1119
1120 --beta Install from the beta channel
1121
1122 --candidate
1123 Install from the candidate channel
1124
1125 --stable
1126 Install from the stable channel
1127
1128 --cohort
1129 Switch the snap into the given cohort
1130
1131 --leave-cohort
1132 Switch the snap out of its cohort
1133
1134 tasks
1135 List a change's tasks
1136
1137 The tasks command displays a summary of tasks associated with an indi‐
1138 vidual change.
1139
1140 Usage: snap [OPTIONS] tasks [tasks-OPTIONS]
1141
1142
1143 Aliases: change
1144
1145
1146 --abs-time
1147 Display absolute times (in RFC 3339 format). Otherwise, display
1148 relative times up to 60 days, then YYYY-MM-DD.
1149
1150 --last Select last change of given type (install, refresh, remove, try,
1151 auto-refresh, etc.). A question mark at the end of the type
1152 means to do nothing (instead of returning an error) if no change
1153 of the given type is found. Note the question mark could need
1154 protecting from the shell.
1155
1156 try
1157 Test an unpacked snap in the system
1158
1159 The try command installs an unpacked snap into the system for testing
1160 purposes. The unpacked snap content continues to be used even after
1161 installation, so non-metadata changes there go live instantly. Metadata
1162 changes such as those performed in snap.yaml will require reinstalla‐
1163 tion to go live.
1164
1165 If snap-dir argument is omitted, the try command will attempt to infer
1166 it if either snapcraft.yaml file and prime directory or meta/snap.yaml
1167 file can be found relative to current working directory.
1168
1169 Usage: snap [OPTIONS] try [try-OPTIONS]
1170
1171 --no-wait
1172 Do not wait for the operation to finish but just print the
1173 change id.
1174
1175 --devmode
1176 Put snap in development mode and disable security confinement
1177
1178 --jailmode
1179 Put snap in enforced confinement mode
1180
1181 --classic
1182 Put snap in classic mode and disable security confinement
1183
1184 unalias
1185 Remove a manual alias, or the aliases for an entire snap
1186
1187 The unalias command removes a single alias if the provided argument is
1188 a manual alias, or disables all aliases of a snap, including manual
1189 ones, if the argument is a snap name.
1190
1191 Usage: snap [OPTIONS] unalias [unalias-OPTIONS]
1192
1193 --no-wait
1194 Do not wait for the operation to finish but just print the
1195 change id.
1196
1197 unset
1198 Remove configuration options
1199
1200 The unset command removes the provided configuration options as re‐
1201 quested.
1202
1203 $ snap unset snap-name name address
1204
1205 All configuration changes are persisted at once, and only after the
1206 snap's configuration hook returns successfully.
1207
1208 Nested values may be removed via a dotted path:
1209
1210 $ snap unset snap-name user.name
1211
1212 Usage: snap [OPTIONS] unset [unset-OPTIONS]
1213
1214 --no-wait
1215 Do not wait for the operation to finish but just print the
1216 change id.
1217
1218 version
1219 Show version details
1220
1221 The version command displays the versions of the running client,
1222 server, and operating system.
1223
1224 wait
1225 Wait for configuration
1226
1227 The wait command waits until a configuration becomes true.
1228
1229 warnings
1230 List warnings
1231
1232 The warnings command lists the warnings that have been reported to the
1233 system.
1234
1235 Once warnings have been listed with 'snap warnings', 'snap okay' may be
1236 used to silence them. A warning that's been silenced in this way will
1237 not be listed again unless it happens again, _and_ a cooldown time has
1238 passed.
1239
1240 Warnings expire automatically, and once expired they are forgotten.
1241
1242 Usage: snap [OPTIONS] warnings [warnings-OPTIONS]
1243
1244 --abs-time
1245 Display absolute times (in RFC 3339 format). Otherwise, display
1246 relative times up to 60 days, then YYYY-MM-DD.
1247
1248 --unicode <default: "auto">
1249 Use a little bit of Unicode to improve legibility.
1250
1251 --all Show all warnings
1252
1253 --verbose
1254 Show more information
1255
1256 watch
1257 Watch a change in progress
1258
1259 The watch command waits for the given change-id to finish and shows
1260 progress (if available).
1261
1262 Usage: snap [OPTIONS] watch [watch-OPTIONS]
1263
1264 --last Select last change of given type (install, refresh, remove, try,
1265 auto-refresh, etc.). A question mark at the end of the type
1266 means to do nothing (instead of returning an error) if no change
1267 of the given type is found. Note the question mark could need
1268 protecting from the shell.
1269
1270 whoami
1271 Show the email the user is logged in with
1272
1273 The whoami command shows the email the user is logged in with.
1274
1275
1276
1277 31 May 2021 snap(8)