Table des matières
While Xubuntu, including the default applications and the applications in the Ubuntu repositories, comes with graphical user interfaces to accomplish most tasks, sometimes you might want or need to use a command line to achieve your goal - or just achieve it faster.
Pour démarrer l'émulateur de terminal par défaut et se rendre à la ligne de commande, soit :
Naviguez vers → →
Appuyez sur et exécutez Alt+F2xfce4-terminal
There is a great tutorial on using the command line in the Ubuntu community wiki.
When working on the command line, any command can be run as an administrator by prefixing the command with sudo
. Sudo will remember your password for 15 minutes to allow you to perform multiple administrative tasks without being prompted for a password each time.
![]() |
|
If the program you wish to run as an administrator is graphical, such as the Mousepad text editor, run the command prefixed with |
![]() |
|
Please note that for an application to run successfully with pkexec, it will need to ship a pkexec policy file. All default applications in Xubuntu that might need to be ran with administrative rights come with pkexec policy files. |
![]() |
|
Be careful when using sudo; you might damage your system if you type the wrong command! As a general rule, only use sudo when absolutely necessary. When you use sudo from a terminal, be sure to either close it when you have finished, or type |
Pour plus d'informations sur sudo, voir la page sudo sur le wiki de la communauté Ubuntu.
Basic terminal commands are outlined below (square brackets indicate substitutions):
Commande | Qu'est-ce qu'elle fait ? | Syntaxe |
---|---|---|
apt-cache
|
Affiche les informations sur les paquets dans le dépôt. Les commandes communes sont les commandes de recherche et d'affichage | apt-cache search web browser ou apt-cache show firefox |
apt-get
|
Gère les paquets apt. Les commandes communes sont : « install » pour installer un paquet, « remove » pour supprimer un paquet, « purge » pour supprimer un paquet et sa configuration et « autoremove » qui supprimera également les paquets inutiles |
apt-get [commande] [paquet]
|
cat
|
Joins (concatenates) two or more files |
cat [fichier1] [fichier2] ... > [fichier de sortie]
|
cd
|
Changes to another directory |
cd [répertoire]
|
cp
|
Copie un fichier (ou des fichiers) vers un répertoire ou écrase un autre fichier |
cp [fichier(s)] [répertoire]
|
date
|
Vous indique la date et l'heure dans différents formats, fuseaux horaires et les conversions. |
date [options]
|
editor
|
Ouvre un fichier texte dans un éditeur |
editor [fichier]
|
grep
|
Searches strings or files | grep [text] [file(s)] ou [command] | grep [text] |
kill
|
Terminates programs with a specified PID. If you don't know the PID you can use pidof |
kill [-SIGNAL] [PID(s)]
|
killall
|
Tout comme celui du dessus, sauf que vous spécifiez le nom des programmes |
killall [-SIGNAL] [process(es)]
|
less
|
Affiche le contenu d'un fichier texte |
less [fichier]
|
ls
|
Liste les fichiers dans un répertoire. Liste les fichiers dans le répertoire courant si aucun n'est spécifié |
ls [répertoire]
|
man
|
Affiche l'aide sur une commande |
man [commande]
|
mv
|
Déplace ou renomme un fichier |
mv [nomdefichier] [nouveaunomdefichier]
|
rm
|
Supprime les fichiers ou répertoires. Soyez très prudent avec cette commande ! Avec l'option -r, elle supprime tous les fichiers et répertoires de manière récursive ! | rm [fichier(s)] ou rm -ir [répertoire(s)] |
wget
|
Télécharge les fichiers dans le répertoire courant. L'option -N peut être utile pour vérifier si un fichier sur le serveur est plus récent que celui que vous avez localement, voir man wget pour plus d'informations. |
wget [url]
|