Convertidor Gratuito

Linux / Bash Hoja de Referencia de Comandos

Hoja de referencia completa de comandos Linux y Bash. Busca más de 80 comandos esenciales con ejemplos, descripciones y copia con un clic.

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

Acerca de esta herramienta

Una guía completa de referencia rápida para Linux Bash. Explore los comandos, la sintaxis y los ejemplos más utilizados organizados por categoría. Con capacidad de búsqueda y compatible con dispositivos móviles: agregue esta página a sus favoritos para obtener acceso instantáneo cuando necesite un recordatorio rápido.

Cómo usarla

  1. Explore las secciones de referencia categorizadas.
  2. Utilice la barra de búsqueda para encontrar comandos o sintaxis específicos.
  3. Haga clic en cualquier entrada para ver ejemplos de uso y explicaciones.
  4. Copie comandos directamente para usarlos en su terminal o editor.

Preguntas frecuentes

¿Esta referencia está actualizada?
La referencia cubre comandos y sintaxis ampliamente utilizados que son estables en todas las versiones. Para conocer las últimas incorporaciones o funciones específicas de la versión, consulte la documentación oficial.
¿Puedo usar esto sin conexión?
Una vez cargada, la página funciona sin conexión a Internet. Márquelo como favorito para un acceso rápido: todo el contenido se muestra en el navegador sin más solicitudes de red.
¿Es esto completo o sólo lo básico?
Cubre los comandos y patrones más utilizados que manejan el 90% de las tareas diarias. Para funciones específicas o avanzadas, consulte la documentación oficial.
¿Puedo sugerir adiciones?
Actualizamos periódicamente nuestras referencias. Si nota que faltan comandos o tiene sugerencias, háganoslo saber a través de nuestra página de contacto.