TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Most Important Linux Commands Cheatsheet

55 pointsby r0f1over 3 years ago

8 comments

eternityforestover 3 years ago
This is the best list I&#x27;ve seen in this genre, because it excludes a lot of commands that you don&#x27;t need and probably won&#x27;t want to use in a modern mostly-GUI workflow, and even gives the appropriate scary warning for rm.<p>If you need something like dd, or any of the &quot;real programming&quot; stuff like if statements and xargs, you probably really love it all and will find it yourself. If you just do a few things in shell and use Python and GUI for the rest, these Are the main ones.<p>Slightly less common ones I&#x27;d add:<p>kill and killall<p>ps -aux | grep APPNAME<p>(Technically not a single command, but it&#x27;s 90% of my use of ps or grep, so it might as well be it&#x27;s own command)<p>cowsay, fortune, neofetch, and lolcat, sl<p>Not actually included in shell but people should know about them anyway.<p>It&#x27;s said that Arch users are legally required to stare at the output of neofetch once per hour at minimum.<p>Various systemctl commands:<p>start, stop, status, enable, disable, mask<p>systemd-analyze critical-chain<p>nmtui (Not sure which distros include this by default and which don&#x27;t)<p>dmesg<p>journalctl, dmesg<p>sudo reboot now<p>sudo shutdown now<p>units (Usually not included, gotta install it)<p>ping, ip a<p>Also, this would be fantastic to include in educational material or even add directly to a distro. Does it have a license?
Maursaultover 3 years ago
Thank goodness for Linux. Where would UNIX and BSD be without the most important Linux commands? I kid. No Linux commands listed, only shell commands. I&#x27;d like to initiate a cutesy repeatable Ghostbuster&#x27;s themed meme: <i>There is no Linux. There is only shell.</i> Maybe if it is popular enough, the zealots will stop insisting GNU&#x2F;Linux is the center of the cosmos, but I doubt it.
评论 #29929689 未加载
vimaxover 3 years ago
As a start to using shell I recommend learning (roughly in order):<p>man<p>grep<p>sed<p>find<p>piping and redirect<p>xargs<p>looping<p>Knowing the basics of those unlocks a lot of the power of the shell. You can you them to brute force your way through most problems as you learn more.
评论 #29933654 未加载
xt00over 3 years ago
I would tweak the redirect info to have “xxx &amp;&gt; file” in there since that’s one that is often confusing to people early on that want to output stdout and stderr to a file and are confused about how to do that. But yea the list of stuff here is a nice starter list for sure.
评论 #29931888 未加载
nhuttonover 3 years ago
I know that people like to use ctrl-R to search backwards through history, but I am very zealous about using the up-arrow to search through your history instead (in your .bashrc):<p>bindkey &quot;^[[a&quot; history-beginning-search-backward<p>bindkey &quot;^[[B&quot; history-beginning-search-forward
thiagocsfover 3 years ago
Pedantic note about ctrl+d: it doesn’t mean logout. It sends and EOF character.<p>Said EOF is honoured by your TTY, which closes the FD this ending the session.<p>You can see this by typing `cat -` and ending it with ctrl+d. The windows equivalent is ctrl+z.
评论 #29943884 未加载
dmckeonover 3 years ago
The content is useful, and familiar to any experienced Unix&#x2F;Linux user, but formatting that content as a table with many heavily folded lines nearly ruins the content for any really new user.
nunezover 3 years ago
OMG thank you for putting this together, OP.<p>I work with clients for whom this knowledge will be greatly useful. CTRL-R is a revelation, every time.