Lab 5

Objective: 

For each of the following commands write a description of what it does and provide a screenshot with an example of its usage:

  1. apt-get update
  2. ping
  3. netstat
  4. wget
  5. locate
  6. gzip
  7. gunzip
  8. tar
  9. zip
  10. unzip

Command: apt-get update

Description: apt-get searches for an install or update software packages.

Update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. One thing to keep in mind is overall progress meter can be incorrect as the size of the package files cannot be known in advance.

Note: For this example I decided to use install instead of update because I didn’t have no update packages.

apt-get install

Command: ping

Description: Ping tests a internet connection.

Ping is commonly used to test a network connection. When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface is up and running. Then, hosts and gateways further and further away should be `pinged’.

ping

 Command: netstat

Description: The command netstat is used to display networking information.

netstat

 Command: wget

Description: The command wget retrieve web pages or files via HTTP, HTTPS or FTP.

wget

Command: locate

Description: The command locate is used to find files.

In this example I used the command “located car”. Every file that has the word car in it is then outputted in the terminal.

locate (car)

 Command: gzip

Description: The command gzip is used to compress or decompress file(s).

gzip

Command: gunzip

Description: gunzip takes a list of files on its command line and replaces each file whose name ends with .gz, -gz, .z, -z, _z or .Z and which begins with the correct magic number with an uncompressed file without the original extension. gunzip also recognizes the special extensions .tgz and .taz as shorthands for .tar.gz and .tar.Z respectively. When compressing, gzip uses the .tgz extension if necessary instead of truncating a file with a .tar extension.

gunzip

Command: tar

Description: The command tar stores, list or extract files in an archive.

tar

 Command: zip

Description: The command zip is used to package and compress (archive) files.

zip

Command: unzip

Description: The command unzip list, test and extract compressed files in a ZIP archive.

unzip

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *