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 interactions without sudo, as well as some some developer-ori‐
624 ented features as detailed in the help for the find, install and re‐
625 fresh 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 --abs-time
643 Display absolute times (in RFC 3339 format). Otherwise, display
644 relative times up to 60 days, then YYYY-MM-DD.
645
646 -n <default: "10">
647 Show only the given number of lines, or 'all'.
648
649 -f Wait for new lines and print them as they come in.
650
651 model
652 Get the active model for this device
653
654 The model command returns the active model assertion information for
655 this device.
656
657 By default, only the essential model identification information is in‐
658 cluded in the output, but this can be expanded to include all of an as‐
659 sertion's non-meta headers.
660
661 The verbose output is presented in a structured, yaml-like format.
662
663 Similarly, the active serial assertion can be used for the output in‐
664 stead of the model assertion.
665
666 Usage: snap [OPTIONS] model [model-OPTIONS]
667
668 --abs-time
669 Display absolute times (in RFC 3339 format). Otherwise, display
670 relative times up to 60 days, then YYYY-MM-DD.
671
672 --color <default: "auto">
673 Use a little bit of color to highlight some things.
674
675 --unicode <default: "auto">
676 Use a little bit of Unicode to improve legibility.
677
678 --serial
679 Print the serial assertion instead of the model assertion.
680
681 --verbose
682 Print all specific assertion fields.
683
684 --assertion
685 Print the raw assertion.
686
687 okay
688 Acknowledge warnings
689
690 The okay command acknowledges the warnings listed with 'snap warnings'.
691
692 Once acknowledged a warning won't appear again unless it re-occurrs and
693 sufficient time has passed.
694
695 pack
696 Pack the given directory as a snap
697
698 The pack command packs the given snap-dir as a snap and writes the re‐
699 sult to target-dir. If target-dir is omitted, the result is written to
700 current directory. If both source-dir and target-dir are omitted, the
701 pack command packs the current directory.
702
703 The default file name for a snap can be derived entirely from its
704 snap.yaml, but in some situations it's simpler for a script to feed the
705 filename in. In those cases, --filename can be given to override the
706 default. If this filename is not absolute it will be taken as relative
707 to target-dir.
708
709 When used with --check-skeleton, pack only checks whether snap-dir con‐
710 tains valid snap metadata and raises an error otherwise. Application
711 commands listed in snap metadata file, but appearing with incorrect
712 permission bits result in an error. Commands that are missing from
713 snap-dir are listed in diagnostic messages.
714
715 Usage: snap [OPTIONS] pack [pack-OPTIONS]
716
717 --check-skeleton
718 Validate snap-dir metadata only
719
720 --filename
721 Output to this filename
722
723 --compression
724 Compression to use (e.g. xz or lzo)
725
726 prefer
727 Enable aliases from a snap, disabling any conflicting aliases
728
729 The prefer command enables all aliases of the given snap in preference
730 to conflicting aliases of other snaps whose aliases will be disabled
731 (or removed, for manual ones).
732
733 Usage: snap [OPTIONS] prefer [prefer-OPTIONS]
734
735 --no-wait
736 Do not wait for the operation to finish but just print the
737 change id.
738
739 prepare-image
740 Prepare a device image
741
742 The prepare-image command performs some of the steps necessary for cre‐
743 ating device images.
744
745 For core images it is not invoked directly but usually via ubuntu-im‐
746 age.
747
748 For preparing classic images it supports a --classic mode
749
750 Usage: snap [OPTIONS] prepare-image [prepare-image-OPTIONS]
751
752 --classic
753 Enable classic mode to prepare a classic model image
754
755 --arch Specify an architecture for snaps for --classic when the model
756 does not
757
758 --channel
759 The channel to use
760
761 --snap <snap>[=<channel>]
762 Include the given snap from the store or a local file and/or
763 specify the channel to track for the given snap
764
765 reboot
766 Reboot into selected system and mode
767
768 The reboot command reboots the system into a particular mode of the se‐
769 lected recovery system.
770
771 When called without a system label and without a mode it will just
772 trigger a regular reboot.
773
774 When called without a system label but with a mode it will use the cur‐
775 rent system to enter the given mode.
776
777 Note that "recover" and "run" modes are only available for the current
778 system.
779
780 Usage: snap [OPTIONS] reboot [reboot-OPTIONS]
781
782 --run Boot into run mode
783
784 --install
785 Boot into install mode
786
787 --recover
788 Boot into recover mode
789
790 recovery
791 List available recovery systems
792
793 The recovery command lists the available recovery systems.
794
795 With --show-keys it displays recovery keys that can be used to unlock
796 the encrypted partitions if the device-specific automatic unlocking
797 does not work.
798
799 Usage: snap [OPTIONS] recovery [recovery-OPTIONS]
800
801 --color <default: "auto">
802 Use a little bit of color to highlight some things.
803
804 --unicode <default: "auto">
805 Use a little bit of Unicode to improve legibility.
806
807 --show-keys
808 Show recovery keys (if available) to unlock encrypted parti‐
809 tions.
810
811 refresh
812 Refresh snaps in the system
813
814 The refresh command updates the specified snaps, or all snaps in the
815 system if none are specified.
816
817 With no further options, the snaps are refreshed to the current revi‐
818 sion of the channel they're tracking, preserving their confinement op‐
819 tions.
820
821 Revision choice via the --revision override requires the user to have
822 developer access to the snap, either directly or through the store's
823 collaboration feature, and to be logged in (see 'snap help login').
824
825 Note a later refresh will typically undo a revision override.
826
827 Usage: snap [OPTIONS] refresh [refresh-OPTIONS]
828
829 --color <default: "auto">
830 Use a little bit of color to highlight some things.
831
832 --unicode <default: "auto">
833 Use a little bit of Unicode to improve legibility.
834
835 --abs-time
836 Display absolute times (in RFC 3339 format). Otherwise, display
837 relative times up to 60 days, then YYYY-MM-DD.
838
839 --no-wait
840 Do not wait for the operation to finish but just print the
841 change id.
842
843 --channel
844 Use this channel instead of stable
845
846 --edge Install from the edge channel
847
848 --beta Install from the beta channel
849
850 --candidate
851 Install from the candidate channel
852
853 --stable
854 Install from the stable channel
855
856 --devmode
857 Put snap in development mode and disable security confinement
858
859 --jailmode
860 Put snap in enforced confinement mode
861
862 --classic
863 Put snap in classic mode and disable security confinement
864
865 --amend
866 Allow refresh attempt on snap unknown to the store
867
868 --revision
869 Refresh to the given revision, to which you must have developer
870 access
871
872 --cohort
873 Refresh the snap into the given cohort
874
875 --leave-cohort
876 Refresh the snap out of its cohort
877
878 --list Show the new versions of snaps that would be updated with the
879 next refresh
880
881 --time Show auto refresh information but do not perform a refresh
882
883 --ignore-validation
884 Ignore validation by other snaps blocking the refresh
885
886 remove
887 Remove snaps from the system
888
889 The remove command removes the named snap instance from the system.
890
891 By default all the snap revisions are removed, including their data and
892 the common data directory. When a --revision option is passed only the
893 specified revision is removed.
894
895 Unless automatic snapshots are disabled, a snapshot of all data for the
896 snap is saved upon removal, which is then available for future restora‐
897 tion with snap restore. The --purge option disables automatically cre‐
898 ating snapshots.
899
900 Usage: snap [OPTIONS] remove [remove-OPTIONS]
901
902 --no-wait
903 Do not wait for the operation to finish but just print the
904 change id.
905
906 --revision
907 Remove only the given revision
908
909 --purge
910 Remove the snap without saving a snapshot of its data
911
912 restart
913 Restart services
914
915 The restart command restarts the given services.
916
917 If the --reload option is given, for each service whose app has a
918 reload command, a reload is performed instead of a restart.
919
920 Usage: snap [OPTIONS] restart [restart-OPTIONS]
921
922 --no-wait
923 Do not wait for the operation to finish but just print the
924 change id.
925
926 --reload
927 If the service has a reload command, use it instead of restart‐
928 ing.
929
930 restore
931 Restore a snapshot
932
933 The restore command replaces the current user, system and configuration
934 data of included snaps, with the corresponding data from the specified
935 snapshot.
936
937 By default, this command restores all the data in a snapshot. Alterna‐
938 tively, you can specify the data of which snaps to restore, or for
939 which users, or a combination of these.
940
941 If a snap is included in a restore operation, excluding its system and
942 configuration data from the restore is not currently possible. This re‐
943 striction may be lifted in the future.
944
945 Usage: snap [OPTIONS] restore [restore-OPTIONS]
946
947 --no-wait
948 Do not wait for the operation to finish but just print the
949 change id.
950
951 --users
952 Restore data of only specific users (comma-separated) (default:
953 all users)
954
955 revert
956 Reverts the given snap to the previous state
957
958 The revert command reverts the given snap to its state before the lat‐
959 est refresh. This will reactivate the previous snap revision, and will
960 use the original data that was associated with that revision, discard‐
961 ing any data changes that were done by the latest revision. As an ex‐
962 ception, data which the snap explicitly chooses to share across revi‐
963 sions is not touched by the revert process.
964
965 Usage: snap [OPTIONS] revert [revert-OPTIONS]
966
967 --no-wait
968 Do not wait for the operation to finish but just print the
969 change id.
970
971 --devmode
972 Put snap in development mode and disable security confinement
973
974 --jailmode
975 Put snap in enforced confinement mode
976
977 --classic
978 Put snap in classic mode and disable security confinement
979
980 --revision
981 Revert to the given revision
982
983 run
984 Run the given snap command
985
986 The run command executes the given snap command with the right confine‐
987 ment and environment.
988
989 Usage: snap [OPTIONS] run [run-OPTIONS] <NAME-OF-SNAP>.<NAME-OF-APP>
990 [<SNAP-APP-ARG>...]
991
992 --shell
993 Run a shell instead of the command (useful for debugging)
994
995 --strace [="with-strace"] <default: "no-strace">
996 Run the command under strace (useful for debugging). Extra
997 strace options can be specified as well here. Pass --raw to
998 strace early snap helpers.
999
1000 --gdbserver [=":0"] <default: "no-gdbserver">
1001 Run the command with gdbserver
1002
1003 --trace-exec
1004 Display exec calls timing data
1005
1006 save
1007 Save a snapshot of the current data
1008
1009 The save command creates a snapshot of the current user, system and
1010 configuration data for the given snaps.
1011
1012 By default, this command saves the data of all snaps for all users.
1013 Alternatively, you can specify the data of which snaps to save, or for
1014 which users, or a combination of these.
1015
1016 If a snap is included in a save operation, excluding its system and
1017 configuration data from the snapshot is not currently possible. This
1018 restriction may be lifted in the future.
1019
1020 Usage: snap [OPTIONS] save [save-OPTIONS]
1021
1022 --no-wait
1023 Do not wait for the operation to finish but just print the
1024 change id.
1025
1026 --abs-time
1027 Display absolute times (in RFC 3339 format). Otherwise, display
1028 short relative times.
1029
1030 --users
1031 Snapshot data of only specific users (comma-separated) (default:
1032 all users)
1033
1034 saved
1035 List currently stored snapshots
1036
1037 The saved command displays a list of snapshots that have been created
1038 previously with the 'save' command.
1039
1040 Usage: snap [OPTIONS] saved [saved-OPTIONS]
1041
1042 --abs-time
1043 Display absolute times (in RFC 3339 format). Otherwise, display
1044 short relative times.
1045
1046 --id Show only a specific snapshot.
1047
1048 services
1049 Query the status of services
1050
1051 The services command lists information about the services specified, or
1052 about the services in all currently installed snaps.
1053
1054 set
1055 Change configuration options
1056
1057 The set command changes the provided configuration options as re‐
1058 quested.
1059
1060 $ snap set snap-name username=frank password=$PASSWORD
1061
1062 All configuration changes are persisted at once, and only after the
1063 snap's configuration hook returns successfully.
1064
1065 Nested values may be modified via a dotted path:
1066
1067 $ snap set snap-name author.name=frank
1068
1069 Configuration option may be unset with exclamation mark:
1070 $ snap set snap-name author!
1071
1072 Usage: snap [OPTIONS] set [set-OPTIONS]
1073
1074 --no-wait
1075 Do not wait for the operation to finish but just print the
1076 change id.
1077
1078 -t Parse the value strictly as JSON document
1079
1080 -s Parse the value as a string
1081
1082 start
1083 Start services
1084
1085 The start command starts, and optionally enables, the given services.
1086
1087 Usage: snap [OPTIONS] start [start-OPTIONS]
1088
1089 --no-wait
1090 Do not wait for the operation to finish but just print the
1091 change id.
1092
1093 --enable
1094 As well as starting the service now, arrange for it to be
1095 started on boot.
1096
1097 stop
1098 Stop services
1099
1100 The stop command stops, and optionally disables, the given services.
1101
1102 Usage: snap [OPTIONS] stop [stop-OPTIONS]
1103
1104 --no-wait
1105 Do not wait for the operation to finish but just print the
1106 change id.
1107
1108 --disable
1109 As well as stopping the service now, arrange for it to no longer
1110 be started on boot.
1111
1112 switch
1113 Switches snap to a different channel
1114
1115 The switch command switches the given snap to a different channel with‐
1116 out doing a refresh.
1117
1118 Usage: snap [OPTIONS] switch [switch-OPTIONS]
1119
1120 --no-wait
1121 Do not wait for the operation to finish but just print the
1122 change id.
1123
1124 --channel
1125 Use this channel instead of stable
1126
1127 --edge Install from the edge channel
1128
1129 --beta Install from the beta channel
1130
1131 --candidate
1132 Install from the candidate channel
1133
1134 --stable
1135 Install from the stable channel
1136
1137 --cohort
1138 Switch the snap into the given cohort
1139
1140 --leave-cohort
1141 Switch the snap out of its cohort
1142
1143 tasks
1144 List a change's tasks
1145
1146 The tasks command displays a summary of tasks associated with an indi‐
1147 vidual change.
1148
1149 Usage: snap [OPTIONS] tasks [tasks-OPTIONS]
1150
1151
1152 Aliases: change
1153
1154
1155 --abs-time
1156 Display absolute times (in RFC 3339 format). Otherwise, display
1157 relative times up to 60 days, then YYYY-MM-DD.
1158
1159 --last Select last change of given type (install, refresh, remove, try,
1160 auto-refresh, etc.). A question mark at the end of the type
1161 means to do nothing (instead of returning an error) if no change
1162 of the given type is found. Note the question mark could need
1163 protecting from the shell.
1164
1165 try
1166 Test an unpacked snap in the system
1167
1168 The try command installs an unpacked snap into the system for testing
1169 purposes. The unpacked snap content continues to be used even after
1170 installation, so non-metadata changes there go live instantly. Metadata
1171 changes such as those performed in snap.yaml will require reinstalla‐
1172 tion to go live.
1173
1174 If snap-dir argument is omitted, the try command will attempt to infer
1175 it if either snapcraft.yaml file and prime directory or meta/snap.yaml
1176 file can be found relative to current working directory.
1177
1178 Usage: snap [OPTIONS] try [try-OPTIONS]
1179
1180 --no-wait
1181 Do not wait for the operation to finish but just print the
1182 change id.
1183
1184 --devmode
1185 Put snap in development mode and disable security confinement
1186
1187 --jailmode
1188 Put snap in enforced confinement mode
1189
1190 --classic
1191 Put snap in classic mode and disable security confinement
1192
1193 unalias
1194 Remove a manual alias, or the aliases for an entire snap
1195
1196 The unalias command removes a single alias if the provided argument is
1197 a manual alias, or disables all aliases of a snap, including manual
1198 ones, if the argument is a snap name.
1199
1200 Usage: snap [OPTIONS] unalias [unalias-OPTIONS]
1201
1202 --no-wait
1203 Do not wait for the operation to finish but just print the
1204 change id.
1205
1206 unset
1207 Remove configuration options
1208
1209 The unset command removes the provided configuration options as re‐
1210 quested.
1211
1212 $ snap unset snap-name name address
1213
1214 All configuration changes are persisted at once, and only after the
1215 snap's configuration hook returns successfully.
1216
1217 Nested values may be removed via a dotted path:
1218
1219 $ snap unset snap-name user.name
1220
1221 Usage: snap [OPTIONS] unset [unset-OPTIONS]
1222
1223 --no-wait
1224 Do not wait for the operation to finish but just print the
1225 change id.
1226
1227 version
1228 Show version details
1229
1230 The version command displays the versions of the running client,
1231 server, and operating system.
1232
1233 wait
1234 Wait for configuration
1235
1236 The wait command waits until a configuration becomes true.
1237
1238 warnings
1239 List warnings
1240
1241 The warnings command lists the warnings that have been reported to the
1242 system.
1243
1244 Once warnings have been listed with 'snap warnings', 'snap okay' may be
1245 used to silence them. A warning that's been silenced in this way will
1246 not be listed again unless it happens again, _and_ a cooldown time has
1247 passed.
1248
1249 Warnings expire automatically, and once expired they are forgotten.
1250
1251 Usage: snap [OPTIONS] warnings [warnings-OPTIONS]
1252
1253 --abs-time
1254 Display absolute times (in RFC 3339 format). Otherwise, display
1255 relative times up to 60 days, then YYYY-MM-DD.
1256
1257 --unicode <default: "auto">
1258 Use a little bit of Unicode to improve legibility.
1259
1260 --all Show all warnings
1261
1262 --verbose
1263 Show more information
1264
1265 watch
1266 Watch a change in progress
1267
1268 The watch command waits for the given change-id to finish and shows
1269 progress (if available).
1270
1271 Usage: snap [OPTIONS] watch [watch-OPTIONS]
1272
1273 --last Select last change of given type (install, refresh, remove, try,
1274 auto-refresh, etc.). A question mark at the end of the type
1275 means to do nothing (instead of returning an error) if no change
1276 of the given type is found. Note the question mark could need
1277 protecting from the shell.
1278
1279 whoami
1280 Show the email the user is logged in with
1281
1282 The whoami command shows the email the user is logged in with.
1283
1284
1285
1286 17 November 2021 snap(8)