مبدل رایگان

لینوکس / Bash برگه تقلب فرمان

برگه تقلب دستورات جامع لینوکس و 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

درباره این ابزار

راهنمای جامع مرجع سریع برای لینوکس bash. دستورات، نحو، و مثال‌های متداول را که بر اساس دسته‌بندی سازماندهی شده‌اند، مرور کنید. قابل جستجو و سازگار با تلفن همراه - در صورت نیاز به یادآوری سریع، این صفحه را برای دسترسی فوری نشانک کنید.

نحوه استفاده

  1. بخش های مرجع طبقه بندی شده را مرور کنید.
  2. از نوار جستجو برای یافتن دستورات یا نحو خاص استفاده کنید.
  3. برای مشاهده مثال های استفاده و توضیحات، روی هر ورودی کلیک کنید.
  4. دستورات را مستقیماً برای استفاده در ترمینال یا ویرایشگر خود کپی کنید.

سوالات متداول

آیا این مرجع به روز است؟
این مرجع دستورات و دستورات پرکاربرد و نحوی را پوشش می‌دهد که در تمام نسخه‌ها پایدار هستند. برای آخرین افزوده‌ها یا ویژگی‌های خاص نسخه، اسناد رسمی را بررسی کنید.
آیا می توانم از این به صورت آفلاین استفاده کنم؟
پس از بارگیری، صفحه بدون اتصال به اینترنت کار می کند. برای دسترسی سریع، آن را نشانک گذاری کنید - تمام محتوا بدون درخواست شبکه بیشتر در مرورگر ارائه می شود.
آیا این جامع است یا فقط اصول اولیه؟
متداول ترین دستورات و الگوهای مورد استفاده را پوشش می دهد که 90٪ از کارهای روزمره را انجام می دهد. برای ویژگی های خاص یا پیشرفته، به اسناد رسمی مراجعه کنید.
آیا می توانم اضافات را پیشنهاد کنم؟
ما به طور مرتب مراجع خود را به روز می کنیم. اگر متوجه شدید دستورات از دست رفته یا پیشنهادی دارید، از طریق صفحه تماس با ما به ما اطلاع دهید.