Modern Linux desktop environments have gained popularity because they’re easy to use and have a more attractive design than the Linux GUI experience of years past.
Despite these milestones, Linux commands that are run from a terminal are still needed — and extremely useful for the end-user. In this article, I’ll share some commonly used commands for use on your Linux desktop, in addition to some great commands that can save you time.
One of my favorite commands is the cp command. Easy to use, it’s useful for copying one file from one location, to another. An example might be something like this:
cp importantfile newimportantfile
This command makes an exact copy of one file within the same directory. You’re also free to change the directories if you like, such as:
cp /home/$USER/importantfile /home/$USER/Desktop/newimportantfile
This command will then copy the target file from the user’s home directory over to the user’s desktop directory.
One last tip for this command is the ability to create a symlink. To create a symlink (symbolic link) to a file using the cp command, you would type the following:
cp -s importantfile newimportantfile
Using the above command will create an executable shortcut to the original file. This is a nice function in that you can create an executable link to another file you might not otherwise want to relocate for whatever reason.
Much like the dir command, using ls also provides you with a complete file list when run in a specific directory. Where ls begins to distinguish itself is in its ability to arrange files listed. For example, I can use ls to list my files with their corresponding dates and times:
ls –full-time
Another useful approach is using ls to sort a list of files, but ignoring the ~backup files for each file listed. Most commonly found with text files, ~backups can be a distraction. So this command is useful in sorting them without the backups filling up the list.
ls -B
Every once in a while, you’re going to have a rogue program that isn’t functioning as expected. When this happens, I’ve found the killall command is the best approach to putting it out of your misery. Unlike its cousin, the kill command, the killall command offers greater flexibility when you don’t know the PID. Granted, you could run the ps command to gain the PID for the misbehaving program…however this isn’t always practical – especially when it’s slowing down your workstation.
To use kill all, you only need know the name of your executable program. For example, if Google Chrome is locking up, you can kill the program with the following:
killall -v chrome
The above command not only kills Chrome dead in its tracks, it uses the verbose argument to let you know it’s dead and not still running in the background somewhere.
Relying on network manager is a common newbie mistake, especially when they’re dealing with network issues. I’ve seen instances where network manager shows someone as being connected to the network, when in fact they weren’t. To counter this, I prefer to take matters into my own hands by using the ifconfig command. By itself without any options used, ifconfig will give you a clear idea of your IP address, data transferred, among other related information.
To use ifconfig to connect to the network in your office, you can simply use the following two commands: [continued on next page]
This will give you an idea what the name of your device is called. Under Ubuntu, it’s likely to be something like eth0 or eth1. Other distributions however, will likely have a different variation. In any case, make a note of it. Then disconnect the device with the following:
ifconfig eth0 down
With the workstation now disconnected from the network, you’re ready to reconnect it.
ifconfig eth0 up
This brings up the wired interface, reconnecting it to the network. With wired connections, this usually works flawlessly.
Sometimes you will be presented with a situation, where you need to make a directory. In the event this can’t or shouldn’t be done from a GUI, doing so from the Linux command line can prove to be useful. To create a new directory using the terminal, simply type the following:
mkdir NameOfNewDirectory
To take the mkdir command even further, you can also choose specific directory permissions by using the following command:
mkdir -m 200 NameOfNewDirectory
The above command created a new directory with permissions allowing for write only, for the owner of the directory. You can learn which permissions are right for your directory, from this article on chmod.
Passwords are often thought of as a mixed blessing. Remembering how or when to update them, for the sake of keeping security in check, is an even bigger problem. Most users will try to change their passwords from a GUI and usually this works. However, I’ve found that using the Linux command line to change passwords will not only provide greater success, but also give greater control overall.
To change your own user password, use the following command:
This will prompt you for the new password – press enter. Then you’ll be asked to confirm it by retyping it. After hitting enter again, you’ll be alerted to the password being updated successfully. The same approach also works for the root user, so long as you know the original root password.
If you need to change your root password, because you forgot it, you can use the following tutorial for Ubuntu users. For other distributions, try this root recovery article.
To enable password aging, where a set password expires and needs to be reset with a new one, follow these commands closely (as root):
nano /etc/login.defs
Locate the section containing PASS_MAX_DAYS 99999.
Change PASS_MAX_DAYS 99999 to something reasonable to say, 60 days.
PASS_MAX_DAYS 60
The next setting you’ll want to change is how many days ahead of time the user will be alerted to when they need to change their user password. Look for this section, change it to something reasonable like five days. By default, it’s already set to seven.
PASS_WARN_AGE 5
You can dive deeper into these settings, but for most situations, this will work just fine for new users being added to a workstation. For existing users however, you will need to use the chage command line tool.
On the surface, relying on the Linux command line might seem dated and perhaps even silly. But for those of us who understand how versatile and powerful using the command line can be, the list of commands above are a mere sample of the tremendous power available at our finger tips.
Next time you need to create a directory, change a password or even troubleshoot a network connectivity issue, consider using your Linux terminal first. The end result might surprise you.
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
FEATURE | By Samuel Greengard,
November 05, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
FEATURE | By Cynthia Harvey,
October 07, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
Top 10 Machine Learning Companies 2020
FEATURE | By Cynthia Harvey,
September 22, 2020
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020
Anticipating The Coming Wave Of AI Enhanced PCs
FEATURE | By Rob Enderle,
September 05, 2020
The Critical Nature Of IBM’s NLP (Natural Language Processing) Effort
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
August 14, 2020
Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.
Advertise with TechnologyAdvice on Datamation and our other data and technology-focused platforms.
Advertise with Us
Property of TechnologyAdvice.
© 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this
site are from companies from which TechnologyAdvice receives
compensation. This compensation may impact how and where products
appear on this site including, for example, the order in which
they appear. TechnologyAdvice does not include all companies
or all types of products available in the marketplace.