Tutorial Ubuntu : Différence entre versions

De MicMac
Aller à : navigation, rechercher
(Basic Ubuntu Commands)
 
(10 révisions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
==Commandes Ubuntu à connaître==
+
==Basic Ubuntu Commands==
 +
 
 +
===sudo===
 +
* Meaning : super user
 +
* Useful when you want to execute command with all the right.
 +
* '''Example :'''
 +
** $ sudo reboot : Launch the reboot command with the root user right.
 +
 
 +
===apt-get===
 +
* Meaning : avanced package tool -get
 +
* Allows to install and remove package.
 +
* '''Examples :'''
 +
** apt-get update : Update packages list.
 +
** apt-get upgrade : Upgrade every packages already installed.
 +
** apt-get install package1 package2 : Install package1 and package2.
 +
** apt-get –purge remove package3 : Remove package3 and every configuration files.
 +
** cd / : Allows to switch back to the previous folder.
  
 
===ls===
 
===ls===
* Signification : list segment
+
* Meaning : list segment
* Permet de lister un répertoire
+
* Allows to list directory
Exemples d'utilisation :<br>
+
* '''Examples :'''
* ls -a : affiche tous les fichiers et répertoires cachés du répertoire courant.
+
** ls -a : display all the hidden folders and directories from the current folder.
* ls /etc/ : affiche le contenu du répertoire /etc/
+
** ls /etc/ : Display all the contents from the folder.
  
 
===cd===  
 
===cd===  
* Signification : change directory
+
* Meaning : change directory
* Permet de se déplacer dans les répertoires
+
* Allows to move into the different folders.
Exemples d'utilisation : <br>
+
* '''Examples :'''
* cd : permet de revenir au répertoire /home/utilisateur (identique à cd -)
+
** cd : Allows to go to the /home/user directory.
* cd .. : permet de revenir au répertoire précèdent
+
** cd .. : Allows to go back to the previous directory.
* cd / : permet de remonter au répertoire parent
+
  
 
===mv===
 
===mv===
* Signification : move
+
* Meaning : move
* Permet de copier des fichiers ou des répertoires
+
* Allows to copy files and directories.
Exemples d'utilisation : <br>
+
*'''Examples :'''
* mv monFichier unRep/ : Déplace monFichier dans le répertoire unRep
+
** mv myFile OneRep/ : Move MyFile into the OneRep directory.
* mv unRep/monFichier : Déplace le fichier monFichier du répertoire unRep là où on se trouve
+
** mv OneRep/myFile : Move MyFile from the OneDir directory to the directory we currently are.
* mv unRep monRep : Renomme unRep en monRep
+
** mv OneRep MyDir : Rename OneRep into MyRep.
  
 
===cp===
 
===cp===
* Signification : copy
+
* Meaning : copy
* Permet de copier des fichiers ou des répertoires
+
* Allows to copy files or directories.
Exemples d'utilisation : <br>
+
* '''Examples :'''
* cp monFichier sousrep/
+
** cp myFile subdir/ : Copy MyFile into subdir
 +
** cp -r monRep/ somewhereelse/ : Copy MyDir directory somewhere else while creating the folder if it doesn't exist yet.
 +
 
 +
===rm===
 +
* Meaning : remove
 +
* Allows to erase files.
 +
* '''Examples :'''
 +
** rm ThisFile : Erase the file ThisFile
 +
** rm -rf /tmp/ThisDir : Erase the /tmp/ThisDir directory and every folders in it.
 +
 
 +
===mkdir===
 +
* Meaning : make directory
 +
* Create an empty folder.
 +
* '''Examples :'''
 +
** mkdir photos : Create the photos folder.
 +
** mkdir -p photos/2005/christmas : Create the christmas directory and if doesn't exist yet, the 2005 and photos directories.
 +
 
 +
===rmdir===
 +
* Meaning : remove directory
 +
* Delete an empty directory.
 +
* ''' Example :''' <br>
 +
** rmdir ThisDir : Delete ThisDir folder.
 +
 
 +
===find===
 +
* Meaning : Find
 +
* Allows to find files and eventually to execute command on these files. Find command affect the origin directory but also the whole subdirectories in it.
 +
* ''' Examples :'''
 +
** Go into the directory where you want to execute the find command :
 +
** find myFile* : Search file starting with "MyFile"
 +
** find *myFile*.ogg : Search file containing "myFile" and with ".ogg" extension.
 +
 
 +
==Keyboard shortcuts==
 +
* Stop all the programs : Alt+Syst+E
 +
* Kill all the programs : Alt+Syst+I
 +
* Brutal reboot : Alt+Syst+B
 +
* Brutal shutdown : Alt+Syst+O
 +
* Make appear the windows display : Alt+Espace
 +
* "Applications" display : Alt+F1
 +
* Launch command : Alt+F2
 +
* Shut the current opened application : Alt+F4
 +
* Switch to one window to another : Alt+Tab
 +
* Go back from one directory : backspace
 +
* Go back to the users directory : Alt+Orig

Version actuelle en date du 2 février 2016 à 10:50

Basic Ubuntu Commands

sudo

  • Meaning : super user
  • Useful when you want to execute command with all the right.
  • Example :
    • $ sudo reboot : Launch the reboot command with the root user right.

apt-get

  • Meaning : avanced package tool -get
  • Allows to install and remove package.
  • Examples :
    • apt-get update : Update packages list.
    • apt-get upgrade : Upgrade every packages already installed.
    • apt-get install package1 package2 : Install package1 and package2.
    • apt-get –purge remove package3 : Remove package3 and every configuration files.
    • cd / : Allows to switch back to the previous folder.

ls

  • Meaning : list segment
  • Allows to list directory
  • Examples :
    • ls -a : display all the hidden folders and directories from the current folder.
    • ls /etc/ : Display all the contents from the folder.

cd

  • Meaning : change directory
  • Allows to move into the different folders.
  • Examples :
    • cd : Allows to go to the /home/user directory.
    • cd .. : Allows to go back to the previous directory.

mv

  • Meaning : move
  • Allows to copy files and directories.
  • Examples :
    • mv myFile OneRep/ : Move MyFile into the OneRep directory.
    • mv OneRep/myFile : Move MyFile from the OneDir directory to the directory we currently are.
    • mv OneRep MyDir : Rename OneRep into MyRep.

cp

  • Meaning : copy
  • Allows to copy files or directories.
  • Examples :
    • cp myFile subdir/ : Copy MyFile into subdir
    • cp -r monRep/ somewhereelse/ : Copy MyDir directory somewhere else while creating the folder if it doesn't exist yet.

rm

  • Meaning : remove
  • Allows to erase files.
  • Examples :
    • rm ThisFile : Erase the file ThisFile
    • rm -rf /tmp/ThisDir : Erase the /tmp/ThisDir directory and every folders in it.

mkdir

  • Meaning : make directory
  • Create an empty folder.
  • Examples :
    • mkdir photos : Create the photos folder.
    • mkdir -p photos/2005/christmas : Create the christmas directory and if doesn't exist yet, the 2005 and photos directories.

rmdir

  • Meaning : remove directory
  • Delete an empty directory.
  • Example :
    • rmdir ThisDir : Delete ThisDir folder.

find

  • Meaning : Find
  • Allows to find files and eventually to execute command on these files. Find command affect the origin directory but also the whole subdirectories in it.
  • Examples :
    • Go into the directory where you want to execute the find command :
    • find myFile* : Search file starting with "MyFile"
    • find *myFile*.ogg : Search file containing "myFile" and with ".ogg" extension.

Keyboard shortcuts

  • Stop all the programs : Alt+Syst+E
  • Kill all the programs : Alt+Syst+I
  • Brutal reboot : Alt+Syst+B
  • Brutal shutdown : Alt+Syst+O
  • Make appear the windows display : Alt+Espace
  • "Applications" display : Alt+F1
  • Launch command : Alt+F2
  • Shut the current opened application : Alt+F4
  • Switch to one window to another : Alt+Tab
  • Go back from one directory : backspace
  • Go back to the users directory : Alt+Orig