Updating, unistalling & Installing packages, reading log files

In this post we’ll be going through on how to update, uninstall and install packages/programs through the terminal with the apt-get command & how to read log files easily.

 

First off we’ll need to open the terminal from where you will be sending the commands. You will need administrator level privileges to be able to use the apt-get command.

 

As always before you do anything be sure you have backed up all your important files.

 

APT-GET

The apt-get command is a powerful, but yet simple and easy to understand command. With apt-get you can update, uninstall, install and do lots of more commands that help you to mange your programs/packages without any real hassle.

apt-get

but unless you are logged in as root and have all your security settings changed you won’t be able to initiate apt-get. You’ll need to add sudo in front of the command to tell the system that you want to use the super user permissions for a short while to change important things.

Every single file that can be updated will be displayed in order and you will be asked if you want to update the specific package/program. To avoid having to press Y to accept the update for too many packages you can add the flag -y to the command. This will make the apt-get command run through it’s job and update everything without asking you every time about something.

So now your command should look something like this:

sudo apt-get -y

Now we’ll have to add the command to tell apt-get what we want to do with it.

 

Updating

To update a non-essential package/program in your Linux distribution we simply need to type this command:

sudo apt-get -y update

 

To update a essential package/program in your Linux distribution we simply need to type this command:

sudo apt-get -y upgrade

 

Uninstalling

To uninstall a package/program in your linux distribution we simply need to type this command:

sudo apt-get -y purge example

This will remove the package/program called example, but be careful with this command

 

Installing

To install a package/program in your Linux distribution we simply need to type this command:

sudo apt-get -y install example

This will install the package/program called example.

 

Example

Let’s see an example:

We’ll be installing these new packages/programs on your Linux distribution:

  • Putty – An SSH client used to connect to other servers for easy server terminal access
  • FileZilla – An SFTP client used to connect to other servers for easy file management
  • VLC – A media player for music, videos and more
  • GCC – The GNU compiler collection
  • Gedit – A simple & advanced text editor
  • Winrar – A program used to compress file(s) into archives for easy storage & transportation (sending&receiving)

We’ll be updating also all the non-essential and essential packages/programs.

sudo apt-get -y install putty filezilla vlc gcc gedit winrar && sudo apt-get -y update && sudo apt-get -y upgrade

 

Reading log files

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s