Brezplačni pretvornik

Linux / Bash Goljufija ukaza

Obsežen goljuf za ukaze Linux in Bash. Iščite po 80+ bistvenih ukazih s primeri, opisi in kopijo z enim klikom.

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

O tem orodju

Obsežen hitri vodnik za linux bash. Prebrskajte po pogosto uporabljenih ukazih, sintaksi in primerih, razvrščenih po kategorijah. Možnost iskanja in prijazna do mobilnih naprav – dodajte to stran med zaznamke za takojšen dostop, ko potrebujete hiter opomnik.

Kako uporabljati

  1. Brskajte po kategoriziranih referenčnih razdelkih.
  2. Z iskalno vrstico poiščite določene ukaze ali sintakso.
  3. Kliknite kateri koli vnos, če si želite ogledati primere uporabe in razlage.
  4. Kopirajte ukaze neposredno za uporabo v terminalu ali urejevalniku.

Pogosta vprašanja

Ali je ta referenca posodobljena?
Referenca pokriva pogosto uporabljene ukaze in sintakso, ki so stabilne med različicami. Za najnovejše dodatke ali funkcije, specifične za različico, preverite uradno dokumentacijo.
Ali lahko to uporabljam brez povezave?
Ko se stran naloži, deluje brez internetne povezave. Dodajte ga med zaznamke za hiter dostop — vsa vsebina se prikaže v brskalniku brez dodatnih omrežnih zahtev.
Je to celovito ali le osnove?
Zajema najpogosteje uporabljene ukaze in vzorce, ki obravnavajo 90 % vsakodnevnih opravil. Za nišne ali napredne funkcije si oglejte uradno dokumentacijo.
Lahko predlagam dodatke?
Naše reference redno posodabljamo. Če opazite manjkajoče ukaze ali imate predloge, nam to sporočite prek naše kontaktne strani.