ਮੁਫ਼ਤ ਪਰਿਵਰਤਕ

ਲੀਨਕਸ / ਬੈਸ਼ ਹੁਕਮ ਚੀਟ ਸ਼ੀਟ

ਵਿਆਪਕ ਲੀਨਕਸ ਅਤੇ ਬਾਸ਼ ਕਮਾਂਡ ਚੀਟ ਸ਼ੀਟ। ਉਦਾਹਰਨਾਂ, ਵਰਣਨ, ਅਤੇ ਇੱਕ-ਕਲਿੱਕ ਕਾਪੀ ਦੇ ਨਾਲ 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% ਕੰਮਾਂ ਨੂੰ ਸੰਭਾਲਦੇ ਹਨ। ਵਿਸ਼ੇਸ਼ ਜਾਂ ਉੱਨਤ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਲਈ, ਅਧਿਕਾਰਤ ਦਸਤਾਵੇਜ਼ਾਂ ਦੀ ਸਲਾਹ ਲਓ।
ਕੀ ਮੈਂ ਜੋੜਾਂ ਦਾ ਸੁਝਾਅ ਦੇ ਸਕਦਾ ਹਾਂ?
ਅਸੀਂ ਨਿਯਮਿਤ ਤੌਰ 'ਤੇ ਸਾਡੇ ਹਵਾਲਿਆਂ ਨੂੰ ਅਪਡੇਟ ਕਰਦੇ ਹਾਂ। ਜੇਕਰ ਤੁਹਾਨੂੰ ਗੁੰਮ ਕਮਾਂਡਾਂ ਨਜ਼ਰ ਆਉਂਦੀਆਂ ਹਨ ਜਾਂ ਕੋਈ ਸੁਝਾਅ ਹਨ, ਤਾਂ ਸਾਨੂੰ ਸਾਡੇ ਸੰਪਰਕ ਪੰਨੇ ਰਾਹੀਂ ਦੱਸੋ।