Linux Beginner’s Guide Part 5

2 minutes read

Linux_logo_errorbits.com

Installing Packages/Applications/Software

The yum (apt-get or apt in Ubuntu) command is used to install new packages and to update/upgrade the operating system, it requires administrative access, so it must be used with sudo.

yum [OPTIONS] [COMMAND]
apt-get [OPTIONS] [COMMAND] (Ubuntu)
apt [OPTIONS] [COMMAND] (Ubuntu)

The operating system must be updated on a regular basis, this way you will keep your data and integrity of the system safe. In order to update your system, run one of the following commands:

yum update
apt-get update (Ubuntu)

yum upgrade (updates the obsolete packages too)
apt-get upgrade (Ubuntu)

After the system is updated you can run yum clean, to erase the files that were left after the packages installed.

apt-get autoremove (Ubuntu)
apt-get autoclean (Ubuntu)
apt-get clean (Ubuntu)

To search for a specific package/application/software in the repository (we will search for inkscape – a graphic software) use: yum search inkscape (apt-get search inkscape in Ubuntu) and to install it run: yum install inkscape (apt-get install inkscape in Ubuntu). And if you no longer need it: yum erase inkscape (apt-get remove inkscape in Ubuntu). (use: yum reinstall inkscape in case you deleted it by mistake)

By default the Linux repository contains only packages that are considered stable, but we will see later in this tutorial, how to modify the repository and add more packages.

Shutdown command

The shutdown command is used to prepare the system to turn off in a safe way, all logged in users will be anounced that the system will be turned off and in the last 5 minutes new logins are blocked.

shutdown [OPTIONS] [TIME] [MESSAGE]

Please note that the shutdown command requires administrative access, so you must login with the root user: su root

The argument [TIME] can accept the following options: now, hh:mm, +minutes

To see the current date/time and date/time format of your system run this command in the console: date

Do a few exercises:

shudown 08:32
shutdown +3 “Bye Bye!”

To stop a shutdown command you must use: shutdown -c

Su users can also use this command in order to issue a restart:

reboot 
shutdown -r now 
halt

Make sure you save your work before you run commands like restart or shutdown.

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

Related Posts:

Many Linux commands deal with sensitive data like system hardware, passwords or operate under exceptional circumstances. Prevents regular users from executing these commands by mistakes and helps to protect data and system integrity. By logging in as root enab...
To install Golang in Kali Linux, you can follow these steps:Open the terminal on your Kali Linux system. Download the latest stable version of Golang from the official website. You can use the wget command to download it directly from the terminal. For example...
The touch command is used to create files of any type, for example you can create test.txt, test.jpg, test.doc but only specialized software can read and create content in these file types.
The ifconfig command is used to view the current network configuration for ethernet cards and iwconfig displays the network configuration for wireless cards. Because this is the output from a Virtual Machine the ethernet is called enp0s3, on hardware machines ...
grep command is a text filter that searches for the input and returns the text lines by a given pattern. In order to start the example, use the following command to get to the /Documents/ folder: cd ~/Documents
Linux Fedora, often referred to simply as Fedora, is a popular open-source Linux-based operating system that is known for its focus on innovation, community-driven development, and cutting-edge features. Fedora is a free and open-source operating system that i...