Chapter Five Network Items Specification
Chapter Five Network Items Specification
Chapter Five Network Items Specification
Free Software
Debian
There is no company behind Debian. Instead there are thousands of well
organized developers that elect a Debian Project Leader every two years. Debian
is seen as one of the most stable Linux distributions. It is also the basis of every
release of Ubuntu. Debian comes in three versions: stable, testing and unstable.
Cont’
Other
Distributions like Oracle Enterprise Linux and Scientific
Linux are based on Red Hat Enterprise Linux and share many
of the same principles, directories and system administration
techniques.
Linux Mint, Edubuntu and many other *buntu named
distributions are based on Ubuntu and thus share a lot with
Debian. There are hundreds of other Linux distributions.
Server and Desktop Differences
There are a few differences between the Ubuntu Server Edition and the
Ubuntu Desktop Edition.
both editions use the same app repositories.
The differences between the two editions are the lack of speed and
storage capacity environment in the desktop Edition, the installation
process, and different Kernel options.
During the Server Edition installation you have the option of installing
additional packages from the CD. The packages are grouped by the type
of service they provide.
Example: DNS server: Selects the BIND DNS server and its
documentation.
File system hierarchy
Many Linux distributions partially follow the File system Hierarchy
Standard. The FHS may help make more Unix/Linux file system trees
conform better in the future.
The root directory /
All Linux systems have a directory structure that starts at the root
directory. The root directory is represented by a forward slash, like
this: /. Everything that exists on your Linux system can be found
below this root directory. Let's take a brief look at the contents of the
root directory.
/bin
This directory contains a number of essential commands that are
available to unprivileged. The /bin directory also houses the shells (such
as bash files).
/lib
This is where all kernel modules needed for system boot libraries that
are required by root system commands (commands found in /bin and
/sbin.). Binaries found in /bin and /sbin often use shared libraries located
in /lib.
/opt
The purpose of /opt is to store optional software. In many cases this is
software from outside the distribution repository. You may find an
empty /opt directory on many systems.
/boot
Contains all files needed to boot the computer. These files don't change
very often. On Linux systems you typically find the /boot/grub directory
here. /boot/grub contains /boot/grub/grub.cfg (older systems may still
have /boot/ grub/grub.conf) which defines the boot menu that is displayed
before the kernel starts.
/etc
All of the machine-specific configuration files should be located in /etc.
Directory Structure
Files are put in a directory.
/var This directory is used to store files which change frequently, and
/dev This contains various devices as files, e.g. hard disk, CD-ROM
drive, etc.
/tmp Temporary files.
Linux Basic Commands
Listing Files and Directories
ls [option] [file]
Creating Files
Touch
Syntax: Touch Filename
cd change to home-directory
cd ~ change to home-directory
Linux is case sensitive; this means that FILE1 is different from file1, and
/etc/hosts is different from /etc/Hosts
Copying Files
Syntax: cp source destination
– Copy the file Source to Destination
Example:
cp file1 /home/ict2: copy the file file1 to the directory /home/ict2
cp –r /home/ict2 ict: copy the directory (with all its file) /home/ict2
to the directory ict
cp /home/ict2/file1: copy the file file1 from the directory /home/ict2
to the current directory
Moving/renaming Files
Syntax: mv source destination
Example:
Syntax: rm File
Example:
Example:
Searching the contents of a file
grep – print lines matching a pattern
Use the less command to display the content of the file and then
type /search string
Example: (search for the word localhost in the file /etc/hosts)
less /etc/hosts/localhost
Summary – Working with files
Summary – Redirection
command > file redirect standard output to a file
command >> file append standard output to a file
command < file redirect standard input from a file
pipe the output of command1 to the
command1 | command2
input of command2
cat file1 file2 > file0 concatenate file1 and file2 to file0
File Permissions
• The long version of a file listing (ls -l) will display
the file permissions:
-rwxrwxrwx
Other permissions
Group permissions
Owner permissions
July 9, 2021 Directory flag (d=directory; l=link) 29
Changing File Permissions
Use the chmod command to change file permissions
July 9, 2021 30
File compressions commends
gzip –gunzip
Apt-Get
The apt-get command is a powerful command line tool used to work
with Ubuntu's Advanced Packaging Tool (APT) performing such
functions as installation of new software packages, upgrade of existing
software packages, updating of the package list index, and even
upgrading the entire Ubuntu system.
Package Management
apt-get update – refresh available updates