Δωρεάν μετατροπέας

Linux / Bash Φύλλο εξαπάτησης εντολών

Ολοκληρωμένο φύλλο εξαπάτησης εντολών Linux και Bash. Αναζητήστε 80+ βασικές εντολές με παραδείγματα, περιγραφές και αντίγραφο με ένα κλικ.

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

Σχετικά με αυτό το εργαλείο

Ένας περιεκτικός οδηγός γρήγορης αναφοράς για το linux bash. Περιηγηθείτε σε εντολές, σύνταξη και παραδείγματα που χρησιμοποιούνται συνήθως κατά κατηγορία. Με δυνατότητα αναζήτησης και φιλικό προς κινητά — προσθέστε σελιδοδείκτη σε αυτήν τη σελίδα για άμεση πρόσβαση όταν χρειάζεστε μια γρήγορη υπενθύμιση.

Πώς να το χρησιμοποιήσετε

  1. Περιηγηθείτε στις κατηγοριοποιημένες ενότητες αναφοράς.
  2. Χρησιμοποιήστε τη γραμμή αναζήτησης για να βρείτε συγκεκριμένες εντολές ή σύνταξη.
  3. Κάντε κλικ σε οποιαδήποτε καταχώρηση για να δείτε παραδείγματα χρήσης και επεξηγήσεις.
  4. Αντιγράψτε εντολές απευθείας για χρήση στο τερματικό ή τον επεξεργαστή σας.

Συχνές ερωτήσεις

Είναι αυτή η αναφορά ενημερωμένη;
Η αναφορά καλύπτει ευρέως χρησιμοποιούμενες εντολές και σύνταξη που είναι σταθερές σε όλες τις εκδόσεις. Για τις πιο πρόσφατες προσθήκες ή λειτουργίες για συγκεκριμένες εκδόσεις, ελέγξτε την επίσημη τεκμηρίωση.
Μπορώ να το χρησιμοποιήσω εκτός σύνδεσης;
Μόλις φορτωθεί, η σελίδα λειτουργεί χωρίς σύνδεση στο διαδίκτυο. Σημειώστε το για γρήγορη πρόσβαση — όλο το περιεχόμενο αποδίδεται στο πρόγραμμα περιήγησης χωρίς περαιτέρω αιτήματα δικτύου.
Είναι αυτό περιεκτικό ή μόνο τα βασικά;
Καλύπτει τις πιο συχνά χρησιμοποιούμενες εντολές και μοτίβα που χειρίζονται το 90% των καθημερινών εργασιών. Για εξειδικευμένες ή προηγμένες λειτουργίες, συμβουλευτείτε την επίσημη τεκμηρίωση.
Μπορώ να προτείνω προσθήκες;
Ενημερώνουμε τακτικά τις αναφορές μας. Εάν παρατηρήσετε ότι λείπουν εντολές ή έχετε προτάσεις, ενημερώστε μας μέσω της σελίδας επικοινωνίας μας.