Bezmaksas pārveidotājs
Linux / Bash Command Cheat Sheet
Visaptveroša Linux un Bash komandu apkrāpšanas lapa. Meklējiet vairāk nekā 80 būtisku komandu ar piemēriem, aprakstiem un kopiju ar vienu klikšķi.
ls
List directory contents
Piemērs:
ls -la /home/userls -la
List all files including hidden, with details
Piemērs:
ls -la ~/Documentscd
Change directory
Piemērs:
cd /var/logpwd
Print working directory path
Piemērs:
pwdmkdir
Create a new directory
Piemērs:
mkdir -p /tmp/mydir/subdirrm
Remove files or directories
Piemērs:
rm -rf /tmp/oldfilescp
Copy files or directories
Piemērs:
cp -r /src/dir /dst/dirmv
Move or rename files/directories
Piemērs:
mv oldname.txt newname.txttouch
Create an empty file or update timestamp
Piemērs:
touch newfile.txtfind
Search for files in a directory hierarchy
Piemērs:
find /home -name '*.log' -mtime -7locate
Find files by name using a prebuilt database
Piemērs:
locate nginx.confln
Create hard or symbolic links
Piemērs:
ln -s /path/to/target /path/to/linkdf
Report disk space usage of file systems
Piemērs:
df -hdu
Estimate file space usage
Piemērs:
du -sh /var/log/*stat
Display file or file system status
Piemērs:
stat /etc/passwdfile
Determine file type
Piemērs:
file /usr/bin/bashcat
Concatenate and display file contents
Piemērs:
cat /etc/hostsless
View file content one screen at a time
Piemērs:
less /var/log/syslogmore
View file content page by page
Piemērs:
more /etc/passwdhead
Output the first part of a file
Piemērs:
head -n 20 /var/log/auth.logtail
Output the last part of a file
Piemērs:
tail -f /var/log/sysloggrep
Search text using patterns
Piemērs:
grep -rn 'error' /var/log/sed
Stream editor for filtering and transforming text
Piemērs:
sed 's/old/new/g' file.txtawk
Pattern scanning and text processing language
Piemērs:
awk '{print $1, $3}' access.logsort
Sort lines of text files
Piemērs:
sort -k2 -n data.txtuniq
Report or omit repeated lines
Piemērs:
sort file.txt | uniq -cwc
Print newline, word, and byte counts
Piemērs:
wc -l /etc/passwdcut
Remove sections from each line of files
Piemērs:
cut -d: -f1 /etc/passwdtr
Translate or delete characters
Piemērs:
echo 'hello' | tr 'a-z' 'A-Z'echo
Display a line of text
Piemērs:
echo "Hello, World!"printf
Format and print data
Piemērs:
printf "%s\t%d\n" name 42diff
Compare files line by line
Piemērs:
diff file1.txt file2.txttee
Read from stdin and write to stdout and files
Piemērs:
ls | tee output.txtps
Report a snapshot of current processes
Piemērs:
ps aux | grep nginxtop
Display Linux processes in real time
Piemērs:
top -u www-datahtop
Interactive process viewer (ncurses-based)
Piemērs:
htopkill
Send a signal to a process
Piemērs:
kill -9 1234killall
Kill processes by name
Piemērs:
killall firefoxbg
Resume a suspended job in the background
Piemērs:
bg %1fg
Bring a job to the foreground
Piemērs:
fg %1jobs
List active jobs in the current shell
Piemērs:
jobs -lnohup
Run a command immune to hangups
Piemērs:
nohup ./script.sh &nice
Run a command with modified scheduling priority
Piemērs:
nice -n 10 ./heavy_task.shsystemctl
Control the systemd system and service manager
Piemērs:
systemctl restart nginxservice
Run a System V init script
Piemērs:
service apache2 statusping
Send ICMP ECHO_REQUEST to network hosts
Piemērs:
ping -c 4 google.comcurl
Transfer data from or to a server
Piemērs:
curl -L -o file.zip https://example.com/file.zipwget
Non-interactive network downloader
Piemērs:
wget -q https://example.com/file.tar.gzssh
OpenSSH remote login client
Piemērs:
ssh -i ~/.ssh/key.pem user@hostscp
Secure copy files between hosts
Piemērs:
scp user@host:/path/file.txt ./local/rsync
Remote file copying tool with delta transfer
Piemērs:
rsync -avz /src/ user@host:/dst/netstat
Print network connections and routing tables
Piemērs:
netstat -tulpnss
Utility to investigate sockets
Piemērs:
ss -tulwnifconfig
Configure a network interface
Piemērs:
ifconfig eth0ip
Show and manipulate routing, devices, and tunnels
Piemērs:
ip addr shownmap
Network exploration tool and port scanner
Piemērs:
nmap -sV 192.168.1.0/24dig
DNS lookup utility
Piemērs:
dig +short A google.comnslookup
Query Internet name servers interactively
Piemērs:
nslookup example.comchmod
Change file mode bits (permissions)
Piemērs:
chmod 755 script.shchown
Change file owner and group
Piemērs:
chown -R www-data:www-data /var/wwwchgrp
Change group ownership
Piemērs:
chgrp developers project/sudo
Execute a command as another user (superuser)
Piemērs:
sudo systemctl restart nginxsu
Change user ID or become superuser
Piemērs:
su - postgrespasswd
Change user password
Piemērs:
passwd usernameumask
Set or display the file mode creation mask
Piemērs:
umask 022id
Print user and group information
Piemērs:
id usernamewhoami
Print the current effective user name
Piemērs:
whoamigroups
Print the groups a user is in
Piemērs:
groups usernametar
Archive files using tape archive format
Piemērs:
tar -czvf archive.tar.gz /path/to/dirtar -x
Extract files from a tar archive
Piemērs:
tar -xzvf archive.tar.gz -C /target/gzip
Compress files using GNU zip
Piemērs:
gzip -9 large_file.loggunzip
Decompress gzip compressed files
Piemērs:
gunzip archive.tar.gzzip
Package and compress files into a ZIP archive
Piemērs:
zip -r output.zip /path/to/dirunzip
Extract files from a ZIP archive
Piemērs:
unzip archive.zip -d /target/bzip2
Compress files using bzip2 algorithm
Piemērs:
bzip2 -z large_file.txtxz
Compress files using the XZ algorithm
Piemērs:
xz -z -9 file.txtuname
Print system information
Piemērs:
uname -auptime
Tell how long the system has been running
Piemērs:
uptimefree
Display amount of free and used memory
Piemērs:
free -hlscpu
Display information about the CPU architecture
Piemērs:
lscpulsblk
List information about block devices
Piemērs:
lsblk -o NAME,SIZE,TYPE,MOUNTPOINTlspci
List all PCI devices
Piemērs:
lspci -v | grep VGAdmesg
Print or control the kernel ring buffer
Piemērs:
dmesg | tail -50journalctl
Query and display messages from the journal
Piemērs:
journalctl -u nginx --since '1 hour ago'history
Display the command history list
Piemērs:
history | grep dockerenv
Print environment variables
Piemērs:
env | grep PATHif / then / fi
Conditional execution in shell scripts
Piemērs:
if [ -f file.txt ]; then echo exists; fifor
Loop over a list of items
Piemērs:
for i in 1 2 3; do echo $i; donewhile
Execute commands while a condition is true
Piemērs:
while read line; do echo $line; done < filecase
Multi-branch conditional matching pattern
Piemērs:
case "$var" in a) echo A;; b) echo B;; esacfunction
Define a shell function
Piemērs:
greet() { echo "Hello, $1!"; }; greet Worldexport
Set environment variables for child processes
Piemērs:
export MY_VAR=valuesource
Execute commands from a file in current shell
Piemērs:
source ~/.bashrcalias
Create an alias for a command
Piemērs:
alias ll='ls -la'cron / crontab
Schedule commands to run periodically
Piemērs:
crontab -e # 0 * * * * /path/to/script.shat
Execute commands at a specified time
Piemērs:
echo 'ls /tmp' | at 14:30Saistītie rīki
Skatīt visus rīkusGit komandas Apkrāptu lapa
Visaptveroša Git komandu apkrāpšanas lapa. Meklējiet vairāk nekā 80 būtisku Git komandu ar piemēriem, aprakstiem un kopiju ar vienu klikšķi.
Docker komandas Apkrāptu lapa
Visaptveroša Docker komandu apkrāpšanas lapa. Meklējiet vairāk nekā 70 būtisku Docker komandu ar piemēriem, aprakstiem un kopiju ar vienu klikšķi.
Vim komandas Apkrāptu lapa
Visaptveroša Vim komandu apkrāpšanas lapa. Meklējiet 80+ būtiskās Vim komandas ar piemēriem, aprakstiem un viena klikšķa kopiju.
SQL formatētājs & Skaistinātājs
Formatējiet, uzlabojiet un notīriet SQL vaicājumus uzreiz savā pārlūkprogrammā. Nav nepieciešama augšupielāde — pilnīgi privāta un bezmaksas.