Ubuntu中老牌apt和新人snap

apt和snap

ubuntu用apt代替了apt-get,ubuntu的母公司Canonical在最新版的Ubuntu中用snap代替了apt。
类似于yum代替了rpm,而后又使用dnf代替了yum。


[Wed Mar 24 11:06 u20@u20-0-52 ~ ]$ snap help --all
The snap command lets you install, configure, refresh and remove snaps.
Snaps are packages that work across many different Linux distributions,
enabling secure delivery and operation of the latest apps and utilities.

Usage: snap <command> [<options>...]

Commands can be classified as follows:

  Basics (basic snap management):
    find             Find packages to install
    info             Show detailed information about snaps
    install          Install snaps on the system
    remove           Remove snaps from the system
    list             List installed snaps

  ...more (slightly more advanced snap management):
    refresh          Refresh snaps in the system
    revert           Reverts the given snap to the previous state
    switch           Switches snap to a different channel
    disable          Disable a snap in the system
    enable           Enable a snap in the system
    create-cohort    Create cohort keys for a set of snaps

  History (manage system change transactions):
    changes          List system changes
    tasks            List a change's tasks
    abort            Abort a pending change
    watch            Watch a change in progress

  Daemons (manage services):
    services         Query the status of services
    start            Start services
    stop             Stop services
    restart          Restart services
    logs             Retrieve logs for services

  Permissions (manage permissions):
    connections      List interface connections
    interface        Show details of snap interfaces
    connect          Connect a plug to a slot
    disconnect       Disconnect a plug from a slot

  Configuration (system administration and configuration):
    get              Print configuration options
    set              Change configuration options
    unset            Remove configuration options
    wait             Wait for configuration

  App Aliases (manage aliases):
    alias            Set up a manual alias
    aliases          List aliases in the system
    unalias          Remove a manual alias, or the aliases for an entire snap
    prefer           Enable aliases from a snap, disabling any conflicting aliases

  Account (authentication to snapd and the snap store):
    login            Authenticate to snapd and the store
    logout           Log out of snapd and the store
    whoami           Show the email the user is logged in with

  Snapshots (archives of snap data):
    saved            List currently stored snapshots
    save             Save a snapshot of the current data
    check-snapshot   Check a snapshot
    restore          Restore a snapshot
    forget           Delete a snapshot
    export-snapshot  Export a snapshot
    import-snapshot  Import a snapshot

  Device (manage device):
    model            Get the active model for this device
    reboot           Reboot into selected system and mode
    recovery         List available recovery systems

  Warnings (manage warnings):
    warnings         List warnings
    okay             Acknowledge warnings

  Assertions (manage assertions):
    known            Show known assertions of the provided type
    ack              Add an assertion to the system

  Introspection (introspection and debugging of snapd):
    version          Show version details
    debug            Run debug commands

  Development (developer-oriented features):
    download         Download the given snap
    pack             Pack the given directory as a snap
    run              Run the given snap command
    try              Test an unpacked snap in the system
    prepare-image    Prepare a device image

For more information about a command, run 'snap help <command>'.

[Wed Mar 24 11:09 u20@u20-0-52 ~ ]$ apt --help
apt 2.0.2ubuntu0.2 (amd64)
Usage: apt [options] command

apt is a commandline package manager and provides commands for
searching and managing as well as querying information about packages.
It provides the same functionality as the specialized APT tools,
like apt-get and apt-cache, but enables options more suitable for
interactive use by default.

Most used commands:
  list - list packages based on package names
  search - search in package descriptions
  show - show package details
  install - install packages
  reinstall - reinstall packages
  remove - remove packages
  autoremove - Remove automatically all unused packages
  update - update list of available packages
  upgrade - upgrade the system by installing/upgrading packages
  full-upgrade - upgrade the system by removing/installing/upgrading packages
  edit-sources - edit the source information file
  satisfy - satisfy dependency strings

See apt(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).

链接

评论