
Follow ZDNET: Add america arsenic a preferred source connected Google.
ZDNET's cardinal takeaways
- There are definite Linux commands I see essential.
- They 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
An illustration of nan SSH bid could be:
ssh jack@192.168.1.11
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.
Also: How to easy alteration files and record permissions connected Linux
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 your remaining CPU aliases 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
An illustration of utilizing nan killall bid would be:
killall -9 firefox.bin
The -9 action tells killall that I'm sending nan SIGKILL signal. Other useful numbers are:
- -1 - Hangup (Closing window)
- -2 - Interrupt (Control + C)
- -9 - Kill
- -15 - Terminate
I thin to ever usage -9 on pinch killall.
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.
Also: My 5 go-to Linux commands for troubleshooting - and really I usage them
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 requires admin privileges to run, truthful usage it pinch sudo. To tally dmesg, nan bid would be:
sudo dmesg
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
Let's opportunity you want to usage grep to database a circumstantial drawstring of characters successful a file. For example, nan record sanction is zdnet.txt and you want to position each entries that incorporate nan drawstring linux. The bid for this would be:
less zdnet.txt | grep linux
You will spot each statement successful nan record that contains linux.
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.
Also: 5 Linux network-related commands each caller personification should know
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.
7. apt-get
Because I mostly usage Ubuntu/Debian-based distributions, nan package head I woody pinch nan astir is apt (and apt-get). There's not a time that goes by erstwhile I don't tally nan apt-get command. I usage this instrumentality to install, remove, and upgrade software. I besides upgrade nan OS pinch apt-get.
Also: 5 Linux commands you request to person fresh - conscionable successful case
Yes, I could spell pinch a GUI beforehand extremity (such arsenic Pop Store, GNOME Software, aliases KDE Discover), but managing applications from nan bid statement is overmuch much businesslike than opening nan GUI, going to nan update tab, checking for updates, and past applying them. Instead, I unfastened a terminal and some update and upgrade pinch a azygous bid for illustration so:
sudo apt-get update && sudo apt-get upgrade -y
Hit Enter, and nan update aliases upgrade will start. The -y action intends I don't person to corroborate nan process.
Get nan morning's apical stories successful your inbox each time pinch our Tech Today newsletter.
3 days ago
English (US) ·
Indonesian (ID) ·