Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 7569

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 28, 20242024-11-28T05:04:06+00:00 2024-11-28T05:04:06+00:00

Ultimate CLI Cheatsheet [Live Doc]

  • 60k

cd ../.. // Usecase: Move up two levels
Ctrl + L // Clear screen by scrolling down

touch

Ex. touch [OPTION]… File…
[OPTION] = optional
File… = required filenames
creating a new file using CLI provided it doesn't exist. In case file exists, it will update the access & modification time to the current time. A File argument that does not exist is created empty.
touch : extension is mandatory, else generic file will be created.
touch ../dog.txt : create a file one level above in parent directory
touch ~/cat.txt : create a file in home directory.
Ex. touch file{1..100}.txt
Ex. touch app.{html,css,js}
Ex. ls -l : long format
Ex. mkdir {images,css,src,templates,scripts}
NOTE = Only one caveat here: just ensure that there are no spaces between the words inside the braces.

pwd:

print working directory
Output: Full path of the current directory you are in. Helps in determining current location within the file system hierarchy.
pwd : shows the full path of the current working directory
pwd -L : (Default), prints the logical path, meaning it shows the path as it appears in the file system
pwd -P : prints the physical path, which resolves all symbolic links to show the actual path on the disk.

dirname:

to strip the last component from a given file path, effectively providing the directory path that contains the file or directory specified.
Usage: Useful for extracting the directory name from a full file path, which can be helpful in scripts and file manipulation tasks.
Ex: dirname /home/user/documents/file.txt
Output: /home/user/documents
Strips file.txt from the path, leaving /home/user/documents

rm & rmdir:

rm -r //will delete mydirectory and everything inside it.
rmdir // will delete mydirectory only if it is empty.

netstat

“netstat -an | grep ESTABLISHED” = Shows all established connections.
“netstat -antp (Linux) or netstat -an -o” (Win) provides additional details, including the process ID (PID) associated with the connection.

Ctrl + R = for reverse search
Ctrl + L = clear the screen
Ctrl + D = exit terminal
curl ifconfig.me = See your public IP

who: (show who is logged on)
who -a: All available information.
who -q: Number of logged-on users.

Flags: [Case-sensitive]

-a OR –all
-i OR –interactive
-l OR long format
-m OR –message
-q OR –quiet
-v OR –version
-w OR –watch
-y OR –yes

-D OR –save-dev
-L OR –logical
-P OR –physical

File and Directory Management

find || locate || ln || rsync || scp || rclone || tree || fdupes || file || basename || split || paste || md5sum || comm || sha256sum || iconv || dos2unix || unix2dos || tac || nl || pr || yes || rev || watch || env || export || alias || unalias || which || whereis || apropos

Text Processing

awk || sed || sort || uniq || cut || tr || wc || diff || cmp 
Enter fullscreen mode Exit fullscreen mode

Process Management

bg/fg || jobs || nohup || htop || nice/renice 
Enter fullscreen mode Exit fullscreen mode

File content

cat || less || head || tail || grep || nano/vim || tee ||  
Enter fullscreen mode Exit fullscreen mode

Permissions

chmod || chown 
Enter fullscreen mode Exit fullscreen mode

System Information, Monitoring & Performance

whoami || uname || df || du || top || ps || kill || killall || uptime || iotop || vmstat || iostat || sar || mpstat || lsof || lsb_release || dstat || ps || pgrep || time ||  
Enter fullscreen mode Exit fullscreen mode

System & User Management

useradd / userdel || usermod || passwd || sudo || cron || dmesg || journalctl || systemctl 
Enter fullscreen mode Exit fullscreen mode

Networking & Security

ping || ifconfig / ip addr || wget || curl || ss || iptables || scp || ssh || telnet || dig || nc [netstat] || fail2ban || ufw || openssl || gpg || nslookup || 
Enter fullscreen mode Exit fullscreen mode

Archiving & Compression

tar || zip / unzip 
Enter fullscreen mode Exit fullscreen mode

Package Management

apt-get [debian based] || yum / dnf [red-hat or cent-os based] || snap  || brew [Mac-OS & Linux] 
Enter fullscreen mode Exit fullscreen mode

Development Tools

gcc || make || git || docker || virtualenv || npm || pip || python || node || javac || docker || kubernetes / kubectl || vagrant || terraform 
Enter fullscreen mode Exit fullscreen mode

Disk & File Management

mount / unmount || fsck || dd || fdisk / parted || mkfs || resize2fs || cryptsetup || btrfs 
Enter fullscreen mode Exit fullscreen mode

Scripting & Automation

alias || xargs || exec || cron 
Enter fullscreen mode Exit fullscreen mode

Debugging, Tshooting, Diagnostics & Logs

strace || ltrace || tcpdump || gdb || nmap || traceroute || who || last || lshw || lsblk || blkid || fdisk || hdparm || ethtool || iwconfig || nmcli || host || ipcalc || mtr || firewalld || route || whois || free || nmon 
Enter fullscreen mode Exit fullscreen mode

cheatsheetclilinuxwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.