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/userls -la
List all files including hidden, with details
Ejemplo:
ls -la ~/Documentscd
Change directory
Ejemplo:
cd /var/logpwd
Print working directory path
Ejemplo:
pwdmkdir
Create a new directory
Ejemplo:
mkdir -p /tmp/mydir/subdirrm
Remove files or directories
Ejemplo:
rm -rf /tmp/oldfilescp
Copy files or directories
Ejemplo:
cp -r /src/dir /dst/dirmv
Move or rename files/directories
Ejemplo:
mv oldname.txt newname.txttouch
Create an empty file or update timestamp
Ejemplo:
touch newfile.txtfind
Search for files in a directory hierarchy
Ejemplo:
find /home -name '*.log' -mtime -7locate
Find files by name using a prebuilt database
Ejemplo:
locate nginx.confln
Create hard or symbolic links
Ejemplo:
ln -s /path/to/target /path/to/linkdf
Report disk space usage of file systems
Ejemplo:
df -hdu
Estimate file space usage
Ejemplo:
du -sh /var/log/*stat
Display file or file system status
Ejemplo:
stat /etc/passwdfile
Determine file type
Ejemplo:
file /usr/bin/bashcat
Concatenate and display file contents
Ejemplo:
cat /etc/hostsless
View file content one screen at a time
Ejemplo:
less /var/log/syslogmore
View file content page by page
Ejemplo:
more /etc/passwdhead
Output the first part of a file
Ejemplo:
head -n 20 /var/log/auth.logtail
Output the last part of a file
Ejemplo:
tail -f /var/log/sysloggrep
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.txtawk
Pattern scanning and text processing language
Ejemplo:
awk '{print $1, $3}' access.logsort
Sort lines of text files
Ejemplo:
sort -k2 -n data.txtuniq
Report or omit repeated lines
Ejemplo:
sort file.txt | uniq -cwc
Print newline, word, and byte counts
Ejemplo:
wc -l /etc/passwdcut
Remove sections from each line of files
Ejemplo:
cut -d: -f1 /etc/passwdtr
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 42diff
Compare files line by line
Ejemplo:
diff file1.txt file2.txttee
Read from stdin and write to stdout and files
Ejemplo:
ls | tee output.txtps
Report a snapshot of current processes
Ejemplo:
ps aux | grep nginxtop
Display Linux processes in real time
Ejemplo:
top -u www-datahtop
Interactive process viewer (ncurses-based)
Ejemplo:
htopkill
Send a signal to a process
Ejemplo:
kill -9 1234killall
Kill processes by name
Ejemplo:
killall firefoxbg
Resume a suspended job in the background
Ejemplo:
bg %1fg
Bring a job to the foreground
Ejemplo:
fg %1jobs
List active jobs in the current shell
Ejemplo:
jobs -lnohup
Run a command immune to hangups
Ejemplo:
nohup ./script.sh &nice
Run a command with modified scheduling priority
Ejemplo:
nice -n 10 ./heavy_task.shsystemctl
Control the systemd system and service manager
Ejemplo:
systemctl restart nginxservice
Run a System V init script
Ejemplo:
service apache2 statusping
Send ICMP ECHO_REQUEST to network hosts
Ejemplo:
ping -c 4 google.comcurl
Transfer data from or to a server
Ejemplo:
curl -L -o file.zip https://example.com/file.zipwget
Non-interactive network downloader
Ejemplo:
wget -q https://example.com/file.tar.gzssh
OpenSSH remote login client
Ejemplo:
ssh -i ~/.ssh/key.pem user@hostscp
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 -tulpnss
Utility to investigate sockets
Ejemplo:
ss -tulwnifconfig
Configure a network interface
Ejemplo:
ifconfig eth0ip
Show and manipulate routing, devices, and tunnels
Ejemplo:
ip addr shownmap
Network exploration tool and port scanner
Ejemplo:
nmap -sV 192.168.1.0/24dig
DNS lookup utility
Ejemplo:
dig +short A google.comnslookup
Query Internet name servers interactively
Ejemplo:
nslookup example.comchmod
Change file mode bits (permissions)
Ejemplo:
chmod 755 script.shchown
Change file owner and group
Ejemplo:
chown -R www-data:www-data /var/wwwchgrp
Change group ownership
Ejemplo:
chgrp developers project/sudo
Execute a command as another user (superuser)
Ejemplo:
sudo systemctl restart nginxsu
Change user ID or become superuser
Ejemplo:
su - postgrespasswd
Change user password
Ejemplo:
passwd usernameumask
Set or display the file mode creation mask
Ejemplo:
umask 022id
Print user and group information
Ejemplo:
id usernamewhoami
Print the current effective user name
Ejemplo:
whoamigroups
Print the groups a user is in
Ejemplo:
groups usernametar
Archive files using tape archive format
Ejemplo:
tar -czvf archive.tar.gz /path/to/dirtar -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.loggunzip
Decompress gzip compressed files
Ejemplo:
gunzip archive.tar.gzzip
Package and compress files into a ZIP archive
Ejemplo:
zip -r output.zip /path/to/dirunzip
Extract files from a ZIP archive
Ejemplo:
unzip archive.zip -d /target/bzip2
Compress files using bzip2 algorithm
Ejemplo:
bzip2 -z large_file.txtxz
Compress files using the XZ algorithm
Ejemplo:
xz -z -9 file.txtuname
Print system information
Ejemplo:
uname -auptime
Tell how long the system has been running
Ejemplo:
uptimefree
Display amount of free and used memory
Ejemplo:
free -hlscpu
Display information about the CPU architecture
Ejemplo:
lscpulsblk
List information about block devices
Ejemplo:
lsblk -o NAME,SIZE,TYPE,MOUNTPOINTlspci
List all PCI devices
Ejemplo:
lspci -v | grep VGAdmesg
Print or control the kernel ring buffer
Ejemplo:
dmesg | tail -50journalctl
Query and display messages from the journal
Ejemplo:
journalctl -u nginx --since '1 hour ago'history
Display the command history list
Ejemplo:
history | grep dockerenv
Print environment variables
Ejemplo:
env | grep PATHif / then / fi
Conditional execution in shell scripts
Ejemplo:
if [ -f file.txt ]; then echo exists; fifor
Loop over a list of items
Ejemplo:
for i in 1 2 3; do echo $i; donewhile
Execute commands while a condition is true
Ejemplo:
while read line; do echo $line; done < filecase
Multi-branch conditional matching pattern
Ejemplo:
case "$var" in a) echo A;; b) echo B;; esacfunction
Define a shell function
Ejemplo:
greet() { echo "Hello, $1!"; }; greet Worldexport
Set environment variables for child processes
Ejemplo:
export MY_VAR=valuesource
Execute commands from a file in current shell
Ejemplo:
source ~/.bashrcalias
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.shat
Execute commands at a specified time
Ejemplo:
echo 'ls /tmp' | at 14:30Herramientas Relacionadas
Ver todas las herramientasComandos Git Hoja de Referencia
Hoja de referencia completa de comandos Git. Busca más de 80 comandos Git esenciales con ejemplos, descripciones y copia con un clic.
Comandos Docker Hoja de Referencia
Hoja de referencia completa de comandos Docker. Busca 70+ comandos esenciales con ejemplos, descripciones y copia con un clic.
Comandos Vim Hoja de Trucos
Hoja de trucos completa de comandos Vim. Busca más de 80 comandos esenciales de Vim con ejemplos, descripciones y copia con un clic.
Consulta SQL Formateador y Resaltador
Formatea, embellece y resalta sintácticamente consultas SQL al instante en tu navegador. Gratis, seguro y sin necesidad de subir archivos.