I'm A Linux Expert, And Here Are 6 Commands I Can't Live Without

Trending 1 month ago
gettyimages-1160618413
ogeday çelik/Getty

ZDNET's cardinal takeaways

  • There are definite Linux commands I see essential.
  • These commands scope from networking, troubleshooting, and record viewing.
  • They're besides easy capable for caller users to learn.

Even though I've been utilizing Linux for decades and americium perfectly astatine location pinch nan bid line, I often show those who are reasoning astir trying nan open-source operating strategy that it isn't necessary.

It's not. Truly.

If I wanted to, I could springiness up nan bid statement altogether. Of course, I'd person to find GUI apps to switch immoderate of nan commands I use, but it tin beryllium done.

Also: Do you request antivirus connected Linux?

Which commands would I person to replace? Well, those are nan commands that I would person a difficult clip doing without. 

If you're funny arsenic to what those commands are (because possibly you want to cognize them yourself), support reading.

1. SSH

Without truthful overmuch arsenic a hesitation, this bid came to mind first. Why? I regularly person to SSH into distant systems to return attraction of definite things. Yes, I recognize that intends I'm still utilizing commands (on nan distant machine), truthful my statement that you can spell without rubbing nan terminal benignant of ends there. But those are typical cases that caller Linux users won't person to interest astir (i.e., administering a distant server). SSH is 1 of those commands I usage each day, passim nan day. Without SSH, location are definite situations that wouldn't beryllium possible, truthful this bid is an absolute must and tops my database of those I can't unrecorded without.

Also: The champion Linux distros for beginners successful 2025 make switching from MacOS aliases Windows truthful easy

2. chmod

I constitute bash scripts to automate tasks and do different things. After penning a script, 1 of nan first things I do is springiness it executable support pinch nan thief of chmod. With nan bid chmod u+x filename, I tin past tally that bid pinch ./filename. I tin moreover move that book to /usr/local/bin and tally it from anyplace (and without nan ./). Yes, I tin do nan aforesaid point pinch immoderate record managers, but giving those bash scripts executable permissions is easier from nan bid line. 

Of course, chmod isn't constricted to conscionable giving a record executable permissions. You tin besides negociate nan publication and constitute permissions of files, which is very useful (especially erstwhile you're connected a instrumentality wherever aggregate users log in).

3. kill/killall

I don't for illustration having to invoke nan termination aliases killall commands, but erstwhile an exertion has gone rogue, it's a must. When an exertion doesn't respond, it's usually accompanied by it gobbling up strategy resources. Should that exertion devour each of your remaining CPU/RAM, your strategy could go unresponsive, which could lead to a difficult reboot, aliases you having to take steps to forestall specified an act. 

Before that happens, I'll usage either nan termination aliases killall bid to debar specified a situation. I'm not saying I usage these 2 devices each day, but erstwhile thing goes awry pinch an app, these 2 commands are basal successful reclaiming power complete my computer.

Also: 8 ways I quickly leveled up my Linux skills - and you tin too

4. dmesg

This is different bid I see a must erstwhile things spell astray. Dmesg displays kernel-related messages that are retrieved from nan kernel ringing buffer. The accusation it gives makes it imaginable to troubleshoot hardware-related errors. This bid is nan first spot I move erstwhile I judge a portion of hardware is failing aliases having problems, arsenic it keeps tabs connected strategy errors, instrumentality errors, and accusation astir connected USB devices. You're not going to lick software-related issues pinch dmesg, but erstwhile it comes to hardware, dmesg is difficult to beat. Do support successful mind that nan dmesg bid does require admin privileges to run, truthful usage it pinch sudo.

5. grep

When I request to view nan contents of a file and hunt for a drawstring of characters, I ever move to grep. With grep, I tin easy find immoderate I'm looking for successful configuration files aliases immoderate different type of matter file. This is particularly useful erstwhile a record is agelong capable that manually searching for a matter drawstring would beryllium a chore. With grep, I tin find that drawstring (or each lawsuit of that string) quickly. The grep bid is 1 of those that you mightiness not usage each day, but you'll beryllium very gladsome it's location erstwhile it comes clip to usage it. I grep files each nan time, and you should too.

Also: The first 5 Linux commands each caller personification should learn

6. ping

When I'm having a networking rumor pinch a Linux computer, nan first point I move to is ping. Not only tin I cheque to make judge my web relationship is still working, but I tin besides cheque ping times. If ping times are excessively high, thing could beryllium incorrect pinch DNS aliases my gateway. If I ping a machine connected my LAN and nan ping times are normal, past I tin norm retired hardware problems connected my machine and attraction connected DNS. I tin past alteration my DNS servers, do different ping test, and spot if that helps. And because ping is easy to usage (aka ping google.com), you don't person to interest astir learning analyzable commands aliases utilizing each sorts of fancy options. Sometimes, if I'm troubleshooting a web relationship (especially a bottleneck), I'll time off nan ping bid moving arsenic I activity to hole nan issue. When nan ping returns (or nan ping times return to normal), I've astir apt solved nan issue.

More