Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati
  • Differenze per "rafbor/Prova1"
Differenze tra le versioni 20 e 21
Versione 20 del 26/04/2025 12.38.21
Dimensione: 4237
Autore: rafbor
Commento:
Versione 21 del 26/04/2025 16.19.21
Dimensione: 6136
Autore: rafbor
Commento:
Le cancellazioni sono segnalate in questo modo. Le aggiunte sono segnalate in questo modo.
Linea 61: Linea 61:
{{{
Image ubuntu:18.04 not found.
Do you want to pull the image now? [Y/n]:
Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
Trying to pull docker.io/library/ubuntu:18.04...
Getting image source signatures
Copying blob 7c457f213c76 done |
Copying config f9a80a55f4 done |
Writing manifest to image destination
f9a80a55f492e823bf5d51f1bd5f87ea3eed1cb31788686aa99a2fb61a27af6a
Creating 'Ubuntu1804' using image ubuntu:18.04 [ OK ]
Distrobox 'Ubuntu1804' successfully created.
To enter, run:
Linea 62: Linea 75:
distrobox enter Ubuntu1804
}}}
Per entrare nel contenitore:
{{{
distrobox enter Ubuntu1804
}}}
{{{
Starting container... [ OK ]
Installing basic packages... [ OK ]
Setting up devpts mounts... [ OK ]
Setting up read-only mounts... [ OK ]
Setting up read-write mounts... [ OK ]
Setting up host's sockets integration... [ OK ]
Integrating host's themes, icons, fonts... [ OK ]
Setting up package manager exceptions... [ OK ]
Setting up package manager hooks... [ OK ]
Setting up dpkg exceptions... [ OK ]
Setting up apt hooks... [ OK ]
Setting up distrobox profile... [ OK ]
Setting up sudo... [ OK ]
Setting up user groups... [ OK ]
Setting up kerberos integration... [ OK ]
Setting up user's group list... [ OK ]
Setting up existing user... [ OK ]
Setting up user home... [ OK ]
Ensuring user's access... [ OK ]

Container Setup Complete!
}}}
{{{#!wiki tip
Si può vedere che si è nel contenitore perché il prompt è cambiato, è diventato:
''NOME_USER@NOME_CONTENITORE''

Altro modo di assicurassi di essere in un contenitore, il comando seguente `echo $CONTAINER_ID` deve ritornare un valore.
}}}


Attenzione! Questa è una Pagina di prova. Le informazioni riportate potrebbero essere incomplete, errate e potenzialmente pericolose. Per contribuire alla realizzazione di questa pagina consultare la discussione di riferimento.

Guida verificata con Ubuntu: 22.04 24.04

Problemi in questa pagina? Segnalali in questa discussione

Introduzione

Distrobox è un'applicazione innovativa che consente di eseguire più distribuzioni Linux sullo stesso sistema in modo semplice ed efficace. Utilizzando contenitori, Distrobox facilita l'installazione e la gestione di diverse distribuzioni senza richiedere configurazioni complesse o partizioni separate. Gli utenti possono così testare, sviluppare o eseguire applicazioni in un ambiente isolato, beneficiando delle funzionalità native di ciascuna distribuzione. Distrobox integra anche strumenti per la condivisione di file e risorse tra l'host e i contenitori, offrendo grande flessibilità.

Installazione

Da repository

Distrobox è presente nei repository delle seguenti versioni di Ubuntu:

Ubuntu

Distrobox

24.04

1.7.0

24.10

1.7.2.1

25.04

1.8.1.2

Installare il pacchetto distrobox.
Per altre versioni di Ubuntu o per ottenere l'ultima versione di Distrobox, utilizzare il metodo alternativo.

Altre versioni di Ubuntu e di Distrobox sono anche disponibili tramite PPA. Per maggiori informazioni, consultare questa pagina.

Metodo alternativo

Per avere la versione più recente, digitare nel terminale il comando:

curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh

Utilizzazione

Comandi di base

Di seguito sono elencati i comandi di base (senza tutte le opzioni) e le relative descrizioni:

Comando

Descrizione

distrobox-assemble --file /my/custom/path.ini

Per creare o distruggere i contenitori in lotti, in base a un file manifest

distrobox-create --name NOME-CONTENITORE --image NOME-OS:VERSIONE

Creazione di un contenitore

distrobox-enter NOME-CONTENITORE

Entrare nel contenitore

distrobox-ephemeral --name NOME-CONTENITORE --image NOME-OS:VERSIONE

Creare un contenitore temporale, distruggerlo quando si esce dalla shell

distrobox-export --app NOME-APPLICAZIONE

Esportazione di un lanciatore di un'applicazione da un contenitore all'host

distrobox generate-entry NOME-CONTENITORE --icon /path/to/icon.png

Creare sull'host, un lanciatore del desktop per un contenitore, imponendo l'icona

distrobox-host-exec COMANDO

Eseguire comandi/programmi dall'host, mentre si è all'interno del contenitore

distrobox-rm NOME-CONTENITORE

Cancellare il contenitore

distrobox-list

Elencare i contenitori attivi

distrobox-stop NOME-CONTENITORE

Fermare il contenitore

distrobox-upgrade NOME-CONTENITORE

Eseguire un aggiornamento del contenitore usando il gestore di pacchetti del contenitore

Per maggiori dettagli su come utilizzare i comandi, visitare il sito web ufficiale.

Esempio

Creazione di un contenitore Ubuntu

Scegliere l'ospite tra le seguenti immagini di contenitori.
Per un contenitore Ubuntu, abbiamo le seguenti scelte:

Ubuntu

Immagini

14.04

ubuntu:14.04

16.04

ubuntu:16.04

18.04

ubuntu:18.04

20.04

ubuntu:20.04

22.04

ubuntu:22.04

24.04

ubuntu:24.04

Per creare un contenitore chiamato Ubuntu1804 basato su un'immagine ubuntu:18.04, digitare nel terminale il comando:

distrobox-create --name Ubuntu1804 --image ubuntu:18.04

Image ubuntu:18.04 not found.
Do you want to pull the image now? [Y/n]: 
Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
Trying to pull docker.io/library/ubuntu:18.04...
Getting image source signatures
Copying blob 7c457f213c76 done   | 
Copying config f9a80a55f4 done   | 
Writing manifest to image destination
f9a80a55f492e823bf5d51f1bd5f87ea3eed1cb31788686aa99a2fb61a27af6a
Creating 'Ubuntu1804' using image ubuntu:18.04   [ OK ]
Distrobox 'Ubuntu1804' successfully created.
To enter, run:

distrobox enter Ubuntu1804

Per entrare nel contenitore:

distrobox enter Ubuntu1804

Starting container...                            [ OK ]
Installing basic packages...                     [ OK ]
Setting up devpts mounts...                      [ OK ]
Setting up read-only mounts...                   [ OK ]
Setting up read-write mounts...                  [ OK ]
Setting up host's sockets integration...         [ OK ]
Integrating host's themes, icons, fonts...       [ OK ]
Setting up package manager exceptions...         [ OK ]
Setting up package manager hooks...              [ OK ]
Setting up dpkg exceptions...                    [ OK ]
Setting up apt hooks...                          [ OK ]
Setting up distrobox profile...                  [ OK ]
Setting up sudo...                               [ OK ]
Setting up user groups...                        [ OK ]
Setting up kerberos integration...               [ OK ]
Setting up user's group list...                  [ OK ]
Setting up existing user...                      [ OK ]
Setting up user home...                          [ OK ]
Ensuring user's access...                        [ OK ]

Container Setup Complete!

Si può vedere che si è nel contenitore perché il prompt è cambiato, è diventato: NOME_USER@NOME_CONTENITORE

Altro modo di assicurassi di essere in un contenitore, il comando seguente echo $CONTAINER_ID deve ritornare un valore.

Ulteriori risorse


CategoryNuoviDocumenti