Convertisseur Gratuit

Linux / Bash Aide-Mémoire des Commandes

Aide-mémoire complet des commandes Linux et Bash. Recherchez plus de 80 commandes essentielles avec exemples, descriptions et copie en un clic.

ls
List directory contents
Exemple :ls -la /home/user
ls -la
List all files including hidden, with details
Exemple :ls -la ~/Documents
cd
Change directory
Exemple :cd /var/log
pwd
Print working directory path
Exemple :pwd
mkdir
Create a new directory
Exemple :mkdir -p /tmp/mydir/subdir
rm
Remove files or directories
Exemple :rm -rf /tmp/oldfiles
cp
Copy files or directories
Exemple :cp -r /src/dir /dst/dir
mv
Move or rename files/directories
Exemple :mv oldname.txt newname.txt
touch
Create an empty file or update timestamp
Exemple :touch newfile.txt
find
Search for files in a directory hierarchy
Exemple :find /home -name '*.log' -mtime -7
locate
Find files by name using a prebuilt database
Exemple :locate nginx.conf
ln
Create hard or symbolic links
Exemple :ln -s /path/to/target /path/to/link
df
Report disk space usage of file systems
Exemple :df -h
du
Estimate file space usage
Exemple :du -sh /var/log/*
stat
Display file or file system status
Exemple :stat /etc/passwd
file
Determine file type
Exemple :file /usr/bin/bash
cat
Concatenate and display file contents
Exemple :cat /etc/hosts
less
View file content one screen at a time
Exemple :less /var/log/syslog
more
View file content page by page
Exemple :more /etc/passwd
head
Output the first part of a file
Exemple :head -n 20 /var/log/auth.log
tail
Output the last part of a file
Exemple :tail -f /var/log/syslog
grep
Search text using patterns
Exemple :grep -rn 'error' /var/log/
sed
Stream editor for filtering and transforming text
Exemple :sed 's/old/new/g' file.txt
awk
Pattern scanning and text processing language
Exemple :awk '{print $1, $3}' access.log
sort
Sort lines of text files
Exemple :sort -k2 -n data.txt
uniq
Report or omit repeated lines
Exemple :sort file.txt | uniq -c
wc
Print newline, word, and byte counts
Exemple :wc -l /etc/passwd
cut
Remove sections from each line of files
Exemple :cut -d: -f1 /etc/passwd
tr
Translate or delete characters
Exemple :echo 'hello' | tr 'a-z' 'A-Z'
echo
Display a line of text
Exemple :echo "Hello, World!"
printf
Format and print data
Exemple :printf "%s\t%d\n" name 42
diff
Compare files line by line
Exemple :diff file1.txt file2.txt
tee
Read from stdin and write to stdout and files
Exemple :ls | tee output.txt
ps
Report a snapshot of current processes
Exemple :ps aux | grep nginx
top
Display Linux processes in real time
Exemple :top -u www-data
htop
Interactive process viewer (ncurses-based)
Exemple :htop
kill
Send a signal to a process
Exemple :kill -9 1234
killall
Kill processes by name
Exemple :killall firefox
bg
Resume a suspended job in the background
Exemple :bg %1
fg
Bring a job to the foreground
Exemple :fg %1
jobs
List active jobs in the current shell
Exemple :jobs -l
nohup
Run a command immune to hangups
Exemple :nohup ./script.sh &
nice
Run a command with modified scheduling priority
Exemple :nice -n 10 ./heavy_task.sh
systemctl
Control the systemd system and service manager
Exemple :systemctl restart nginx
service
Run a System V init script
Exemple :service apache2 status
ping
Send ICMP ECHO_REQUEST to network hosts
Exemple :ping -c 4 google.com
curl
Transfer data from or to a server
Exemple :curl -L -o file.zip https://example.com/file.zip
wget
Non-interactive network downloader
Exemple :wget -q https://example.com/file.tar.gz
ssh
OpenSSH remote login client
Exemple :ssh -i ~/.ssh/key.pem user@host
scp
Secure copy files between hosts
Exemple :scp user@host:/path/file.txt ./local/
rsync
Remote file copying tool with delta transfer
Exemple :rsync -avz /src/ user@host:/dst/
netstat
Print network connections and routing tables
Exemple :netstat -tulpn
ss
Utility to investigate sockets
Exemple :ss -tulwn
ifconfig
Configure a network interface
Exemple :ifconfig eth0
ip
Show and manipulate routing, devices, and tunnels
Exemple :ip addr show
nmap
Network exploration tool and port scanner
Exemple :nmap -sV 192.168.1.0/24
dig
DNS lookup utility
Exemple :dig +short A google.com
nslookup
Query Internet name servers interactively
Exemple :nslookup example.com
chmod
Change file mode bits (permissions)
Exemple :chmod 755 script.sh
chown
Change file owner and group
Exemple :chown -R www-data:www-data /var/www
chgrp
Change group ownership
Exemple :chgrp developers project/
sudo
Execute a command as another user (superuser)
Exemple :sudo systemctl restart nginx
su
Change user ID or become superuser
Exemple :su - postgres
passwd
Change user password
Exemple :passwd username
umask
Set or display the file mode creation mask
Exemple :umask 022
id
Print user and group information
Exemple :id username
whoami
Print the current effective user name
Exemple :whoami
groups
Print the groups a user is in
Exemple :groups username
tar
Archive files using tape archive format
Exemple :tar -czvf archive.tar.gz /path/to/dir
tar -x
Extract files from a tar archive
Exemple :tar -xzvf archive.tar.gz -C /target/
gzip
Compress files using GNU zip
Exemple :gzip -9 large_file.log
gunzip
Decompress gzip compressed files
Exemple :gunzip archive.tar.gz
zip
Package and compress files into a ZIP archive
Exemple :zip -r output.zip /path/to/dir
unzip
Extract files from a ZIP archive
Exemple :unzip archive.zip -d /target/
bzip2
Compress files using bzip2 algorithm
Exemple :bzip2 -z large_file.txt
xz
Compress files using the XZ algorithm
Exemple :xz -z -9 file.txt
uname
Print system information
Exemple :uname -a
uptime
Tell how long the system has been running
Exemple :uptime
free
Display amount of free and used memory
Exemple :free -h
lscpu
Display information about the CPU architecture
Exemple :lscpu
lsblk
List information about block devices
Exemple :lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
lspci
List all PCI devices
Exemple :lspci -v | grep VGA
dmesg
Print or control the kernel ring buffer
Exemple :dmesg | tail -50
journalctl
Query and display messages from the journal
Exemple :journalctl -u nginx --since '1 hour ago'
history
Display the command history list
Exemple :history | grep docker
env
Print environment variables
Exemple :env | grep PATH
if / then / fi
Conditional execution in shell scripts
Exemple :if [ -f file.txt ]; then echo exists; fi
for
Loop over a list of items
Exemple :for i in 1 2 3; do echo $i; done
while
Execute commands while a condition is true
Exemple :while read line; do echo $line; done < file
case
Multi-branch conditional matching pattern
Exemple :case "$var" in a) echo A;; b) echo B;; esac
function
Define a shell function
Exemple :greet() { echo "Hello, $1!"; }; greet World
export
Set environment variables for child processes
Exemple :export MY_VAR=value
source
Execute commands from a file in current shell
Exemple :source ~/.bashrc
alias
Create an alias for a command
Exemple :alias ll='ls -la'
cron / crontab
Schedule commands to run periodically
Exemple :crontab -e # 0 * * * * /path/to/script.sh
at
Execute commands at a specified time
Exemple :echo 'ls /tmp' | at 14:30

À propos de cet outil

Un guide de référence rapide complet pour Linux bash. Parcourez les commandes, la syntaxe et les exemples couramment utilisés, organisés par catégorie. Consultable et adapté aux appareils mobiles : ajoutez cette page à vos favoris pour un accès instantané lorsque vous avez besoin d'un rappel rapide.

Comment l'utiliser

  1. Parcourez les sections de référence catégorisées.
  2. Utilisez la barre de recherche pour rechercher des commandes ou une syntaxe spécifiques.
  3. Cliquez sur n’importe quelle entrée pour voir des exemples d’utilisation et des explications.
  4. Copiez les commandes directement pour les utiliser dans votre terminal ou éditeur.

Questions fréquentes

Cette référence est-elle à jour ?
La référence couvre les commandes largement utilisées et la syntaxe stable d’une version à l’autre. Pour les derniers ajouts ou fonctionnalités spécifiques à la version, consultez la documentation officielle.
Puis-je l'utiliser hors ligne ?
Une fois chargée, la page fonctionne sans connexion Internet. Ajoutez-le à vos favoris pour un accès rapide : tout le contenu est affiché dans le navigateur sans autres requêtes réseau.
Est-ce complet ou juste les bases ?
Il couvre les commandes et les modèles les plus couramment utilisés qui gèrent 90 % des tâches quotidiennes. Pour des fonctionnalités de niche ou avancées, consultez la documentation officielle.
Puis-je suggérer des ajouts ?
Nous mettons régulièrement à jour nos références. Si vous remarquez des commandes manquantes ou avez des suggestions, faites-le nous savoir via notre page de contact.