Tutorial Ubuntu

De MicMac
Aller à : navigation, rechercher

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