Home Did you know ? 5 Linux Commands Every Linux Newbie Must Know

5 Linux Commands Every Linux Newbie Must Know

by Unallocated Author

Having a graphical user interface is very good for newcomers and it also makes our job easy for example placing an order in Amazon using browser is fairly easy but doing the same using terminal seems like an over-enthusiastic exercise. I like GUIs but at times when GUI fails to start, having the knowledge of basic commands will save your day in  terminal.

If you are a starter, here are five basic linux commands you need to get hold of first.

1. sudo

It is one command that is different from all other commands, or i say it is a super command. The job sudo does is really straight forward. The command following the sudo will run with superuser or root privileges. We use sudo for things like updating the system or changing configuration files.



Sudo also has the power to destroy your system completely. This is the reason you will recieve the  following lecture when you are using sudo for the first time.:

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: 1)Respect the privacy of others. 2)Think before you type. 3)With great power comes great responsibility.

2. Your package manager tools (yum, apt, or pacman)

The main reason you will use sudo is to add or remove programs from your PC using using package manager. Although the three major package managers I mention here all differ in their respective command arguments and grammar, they are all capable of the same three basic functions: installing a package, removing a package, and upgrading all the packages on the system. (Note: If you are not logged in as root, you will need to prepend these commands with sudo.)

yum (Red Hat/Fedora/CentOS)

Install a package:

yum install <package>

Remove a package:

yum remove <package>

Upgrade the system:

yum update

apt (Debian/Ubuntu/Mint)

Install a package:

apt install <package>

Remove a package:

apt remove <package>

Upgrade system:

apt update
apt upgrade

pacman (Arch/Manjaro)

Install a package:

pacman -S <package>

Remove a package:

pacman -R <package>

Upgrade the system:

pacman -Syu

All of these package managers have many more features than what I’ve listed here, but these three functions are what you’ll use most of the time.

3. systemctl (Systemd)

For the longest time, background programs called daemons were started using a series of scripts called initscripts. For newcomers, initscripts were hard to read and interpret or change. More recently, initscripts have been replaced by a service management application called Systemd. If you’re running a recent Linux distribution, there’s a good chance that Systemd is starting the services you need.

One of the chief complaints about Systemd is that it can do too much. (Unix programs usually aim to do one thing, and one thing very well.) However, there are five keywords you should consider with systemd.

To start a service, simply use the start keyword:

systemctl start <service name>

Similarly, you can restart a service if it has failed, or if its configuration has changed:

systemctl restart <service name>

To stop a service, use stop:

systemctl stop <service name>

To enable the service at boot, you can use the enable keyword:

systemctl enable <service name>

And finally, you can disable a service to keep it from starting at boot:

systemctl disable <service name>

4. ls

The ls command is simple and straightforward, but it is more useful than one might think. The ls command lists the files and folders in a given path. By default, it lists the files and folders in the current working directory (usually the user’s home). You can find the contents of a given path too.

5. man

Sometimes you need help. Sometimes you need help and you don’t have access to the internet. Those are dark times. In those situations, man can save your butt.

Though man can be useful when an internet connection isn’t available, Google is a much better resources when you actually are online. It’s worth noting that the first few Google results you’ll get for a given command like chmod will be a web version of the man page.

You may also like