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:
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.
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]