e s u y n a r o f e l b i s n o p s e r d l e h e b t o n

n PILOT VERSION a n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p Remember: This is not the best format to

t t h t h i ( w ”

l

d enjoy this content. Visit cisoss.eu to download a e n d o . i n t n u i a f e

n the sources in ELP format (ExeLearning) or r r n e e e t h e t n b I

d s

e see the IMS deployed in our Moodle platform. 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h

a Content created by: 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E

A ESSI PROJECTS LIMITED o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ e s u y n a r o f e l b i s n o Operating Systems p s e r

Operating Systems d l e h

e Content created by: b t o n SSI PROJECTS LIMITED n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Introduction GNU Linux e s u The GNU Linux is an Operating System where you can perform several actions on it, you can install y n a

programs to run in order to execute a text processing, deploying a web server, executing a database to r o f

search for information and much more. e l b i s n o p s e The main goals in this Introduction is to: r d l e h

e b t o n Knowing what is a GNU/Linux distribution n a c n

o Knowing the relationship between RHEL, Fedora, CentOS distros and Debian, Ubuntu distros. i s s i m Knowing the difference between graphical environment and Terminal m o C e

h Working with Bash Shell t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ What is GNU/Linux? e s u The GNU/Linux Operating Systems is a type of free software you can download and intall on your y n a

hardware. It is based on Open Source Software, which are available to everyone under a license, called r o f

GPL (General Public License) in which the copyright holder provides the rights to study, change and e l b distribute the software to anyone and for any purpose. This provides to everyone the mechanism to i s n develop and customize the operating system as they want, if you know what to modify and a little bit of o p s

e programming. r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e

h t s t c e

l Generally people do not make difference between GNU Systems and Linux, Linux is the kernel of the f e r

system, the part of the system which manage the resources of the system, the system calls, read/write n o i disk operations, etc. GNU Systems holds Linux within. t a c i l

b The following image will show exactly the difference and where to locate the concepts u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s To know more about GNU/Linux Systems 1 e - n d 5 o a 1 m 0 m

https://www.gnu.org/gnu/linux-and-gnu.es.html 2 m e (

o b t c C y e a e j To know more about GPL License v o m i r

t p h a

c e s i i r https://www.gnu.org/licenses/gpl-3.0.en.html h h C T w “ GNU/Linux Distributions e s u A GNU/Linux Distributions, is an Operating System that is based on a collection of software in order to y n a

customize their behavior and a linux kernel based on a GNU/Linux System parent. r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r GNU/Linux Distributions Timelines. In this graphic we can observe the amount of distros that had been r o c p / /

p appear during this years, when they start, and sometimes, die. : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/). This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/). This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. This publication reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein. “Creative Commons Attribution-ShareAlike 4.0 International” (https://creativecommons.org/licenses/by-sa/4.0/). RHEL / CentOS / Fedora e s u Relationship between RHEL based Distributions y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i Red Hat is the Parent distribution of Fedora and CentOS (which means that are based on Red Hat t a c i distro). The source codes are developed by Fedora Community (fedoraproject.org). The Fedora l b u Community is a group of people around the world that work together in order to improve the performance p

. ) s / i of the distro. When the source code are finally developed, they give the code to Red Had, which test the 0 h . T 4

/

. code to ensure that work correctly. Fedora benefits from the sponsorship and feedback from Red Hat, a n s o - i that means that Red Hat can bring leading-edge innovation to the broader community for collaboration, y s s b i /

s enabling a rapid maturation of the technology. CentOS are holding the Red Hat source codes, because m e s m n Red Hat is very stable and exhaustivly and widely tested, that means that their packages ensures their o e c C i

l functionallity. / n a g r e o p . o s r n u o E

m e Here is a picture that will clarify this explanation. m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ e s u y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g

r The reference: https://fedoraproject.org/wiki/Docs_Project?rd=DocsProject e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Ubuntu / Debian e s u Relationship between Debian and Ubuntu y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ .

a n s o - i y s s b i / Ubuntu builds on the foundations of Debian's architecture and infrastructure, but there are important s m e s m

n differences. Ubuntu has its own user interface, a separate developer community (though many o e c C i developers participate in both projects) and a different release process. l / n a g r e o p . o

s r n u o E

m e About Debian m h t o

c m e o v Debian can be considered the rock upon which Ubuntu is built. It is a volunteer project that has r i t f

a t e r developed and maintained a GNU/Linux operating system of the same name for well over a decade. r o c p / / p

: Since its launch, the Debian project has grown to comprise more than 1,000 members with official s u s p

t developer status, alongside many more volunteers and contributors. Today, Debian encompasses over t h t h i ( 20,000 packages of free, open source applications and documentation. w ”

l d a e n d o . i n t n About Ubuntu u i a f e

n r r n e e e t h

e Ubuntu is an open source project that develops and maintains a cross-platform, open-source operating t n b I

d s e 0 system based on Debian. Upgrades are released every six months and support is guaranteed by a . n i h 4

a ) t e Canonical for up to five years. Canonical also provides commercial support for Ubuntu deployments 8 n k i 5 o l 8 c across the desktop, the server and the cloud.

A 5 n e 1 r o 0 i a - t h

a 2 S 0 - m 2 r n o o A f i

t Reference: https://www.ubuntu.com/about/about-ubuntu/ubuntu-and-debian n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Graphical Environment or Terminal e s u When to use Graphical Environment or Terminal y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o Graphical environment is usefull to do some tasks intuitively with the mouse/touchpad. You can install y l

n packages, view documents, work between folders of your own, and configure service for your computer. o

s The terminal i much more powerfull in order to administrate the computer. It gives you the chance of w e i manage all the files of the system (with root privileges) change permissions of folders and files, manages v e

h services, configuring the services, executing programs with parameters and much more t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Commands e s u Basic user / root Commands y n a r o

f # man command e l

b i s n # id o p s # su - e r

d # passwd [ user ] l e h

# exit e b

t o n # sudo root_command n a c n o i s s i m m o C e h t Preknowledge d n a

, r o h t u a e h t f man: Is a software documentation which topic covered include computer o y l programs(libraries and syscalls) formal standards and conventions, and even abstract n o concepts. The command that follows the man command is to indicate that we want to s w e read the documentation page of the command: command i v e h t id: This command print the real and effective user and group IDs s t c e l

f su -: Allows to run a command with substitute user and group. If we do not indicate e r which user to allow, it take the root by default. If I had a user that is called John, and n o i t wanted to change to user God, I could do that by typing su - God. The hyphen is to a c i l indicate that we want to load the environment variables of God. A environment variable, b u

p is a type of data that is stored in each user, some of them are common, but we can

. ) s / i 0 h customize each variables by putting, for example, the path of a database of gods. . T 4

/ . a n s o -

i password [user]: This command is to change the password of the user that we indicate y s s b i / at the end of the command. s m e s m n o e exit: This is to quit the environment, in this case if we entered as root, we quit from being c C i

l / n a g root and get back to our users. If we type exit with our user, we will close the terminal r e o p . o

s session. r n u o E

m e sudo root_command: This command is to execute a root_command as root, but without m h t o

c being the root user. we have to be in the sudoers file to be able to execute m e o v r i t f root_commands as root.

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u Laboratory - Bash Shell and LOGIN y n a r o

f [ student@server ] $ su - e l

b password i s n o p s [ root@server ] # id e r

d [ root@server ] # passwd l e h

e b

t [ root@server ] # exit o n n a c

[ student@server ] $ id n o i [ student@server ] $ passwd s s i m m

o [ student@server ] $ sudo passwd root C

e [ student@server ] $ su - h t d n a

, r o h t Entering as root user. At this point the system will ask us the password of the user root. u a e h t

We execute the id command to look for our user and group IDs. f o y l We change the password root. n o s w We leave from root user and environment. e i v e

h We execute the id command to look for our user and group IDs. t s t c e

l We change the password of user student. f e r

n We change the password root by enabling the execution through sudo command. o i t a c i l We enter as root user, loading the environment variables. b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Software Installation e s u Achievements y n a r

o f e l b i s Knowing the differences betwseen RPM and DEB package files n o p s e r Knowing the differences betwseen RPM and DEB package files d l e h

e Knowing how to install and update software b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Differences between DEB and RPM e s Main Difference u y n a

From user’s point of view, there isn’t much difference in these tools. The RPM and DEB formats are both r o f

just archive files, with some metadata attached to them. They are both equally arcane, have hardcoded e l b i install paths and only differ in subtle details. DEB files are installation files for Debian based distributions. s n

o RPM files are installation files for Red Hat based distributions. Ubuntu is based on Debian’s package p s e manage based on APT and DPKG. Red Hat, CentOS and Fedora are based on the old Red Hat Linux r d l package management system, RPM. e h e b

t o n n a RPM c n o i

s It is a package management system. The name RPM variously refers to the .rpm file format, files in this s i

m format, software packaged in such files, and the package manager itself. RPM was intended primarily for m

o Linux distributions; the file format is the baseline package format of the Linux Standard Base. RPM was C

e developed by Community & Red Hat. h t d n a

, r o h t Specifications: u a e h t f o y l All packages located in ~/rpmbuild n o s w e

i Underneath, exist the folder SPEC, SOURCES, RPMS and SPRMS v e h t What defines how everything in the package will be installed goes into spec-file s t c e l f e r n o i t

a Reference: https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ c i l b u DEB p

. ) s / i 0 h .

T 4

/ . a n s o - i y s DEB is the extension of the Debian software package format and the most often used name for such s b i / s m e binary packages. DEB was developed by Debian s m n o e c C i

l / n a g r e o p . o

s Specifications: r n u o E

m e m h t o

c m

e Development files are contained in a directory per package o v r i t f

a t e r r o A bit more accepted to carry patches in a package that are not upstream. c p / / p : s u s p

t t h A vast amount of scripts that are able to automate a huge portion of creating a t h i ( w ”

package. l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a .

n Reference: https://wiki.debian.org/deb i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ YUM e s u Yum is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux y n a

RPMs software packages from official Red Hat software repositories, as well as other third-party r o f

repositories (Fedora and CentOS). yum is used in Red Hat Enterprise Linux versions 5 and later, Fedora e l b

i and CentOS distributions. s n o p

s e r d l e # yum h e

b repolist Display the configured software repositories t o search Search package details for the given string n n a

c info Display details about a package n

o install Install a package or packages on your system i s s i erase Remove a package or packages from your system m

m o C

provides Find what package provides the given value e h t

history Display, or use, the transaction history d n a

, r

o help Display a helpful usage message h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ APT-GET / CACHE e s u APT-CACHE y n a r

o The apt-cache command can display much of the information stored in APT's internal database. This f e l information is a sort of cache since it is gathered from the different sources listed in the source.list file. b i s This happens during the apt update operation. n o p s e The apt-cache command can do keyword-based package searches with apt-cache keyword. It can also r d l display the headers of the package's available versions with apt-cache show package. This command e h

e provides the package's description, its dependencies, the name of its maintainer, etc. Note that apt b t

o search, apt show, aptitude show work in the same way. n n a c

n o i s s

i man page m m o # apt-cache C e

h t d

n pkgnames List all available packages a

, r search Find out package names and description o h t show Show information about the package u a

e showpkg Check dependencies for a particular software h t f o

y l n o s APT-GET w e i v

e The apt-get command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging h t

s Tool (APT) performing such functions as installation of new software packages, upgrade of existing t c e

l software packages, updating of the package list index, and even upgrading the entire Ubuntu system. f e r

n Being a simple command-line tool, apt-get has numerous advantages over other package management o i t a tools available in Ubuntu for server administrators. Some of these advantages include ease of use over c i l b simple terminal connections (SSH), and the ability to be used in system administration scripts, which can u p

.

) in turn be automated by the cron scheduling utility. s / i 0 h . T 4

/ .

a n s o - i y s s b i / man page s m e s m n o e c C i

l

/ # apt-get n a g r e o

p . o s r n

u update Update system packages o E

m e upgrade Upgrade software packages m h t o

c install Install a specific software m e o v r i t f purge Delete one package

a t e r r o remove Delete software from system without removing config files c p / / p : autoremove Removes package and dependecies s u s p

t t h clean Free up disk space by cleaning downloaded files and packages from the local reposito t h i ( w ”

l d a e n d o .

i n t n u i a f e

n r r n e e e DEBIAN - DPKG t h e t n b I

d s e 0 a . n dpkg is a tool to install, build, remove and manage Debian packages. The primary and more user-friendly i h 4

a ) t e 8 n k front-end for dpkg is aptitude. dpkg itself is controlled entirely via command line parameters, which i 5 o l 8 c

A 5 consist of exactly one action and zero or more options. The action- parameter tells dpkg what to do and n e 1 r o 0 i a

- t options control the behavior of the action in some way. h a 2 S 0 - m 2 r n o o A f

i t n K i u -

b 1 e i 0 r h t t man page S

t f E A o -

s 1 e - n d 5 o # dpkg a 1 m 0 m

2 m e (

o b t c C

y -i #pkg_name Installing a donwnloaded package e a e j v o m i r

-l List all installed packages t p h a

c e s i i r -l #pkg_name View a specific package installed h h C T w “ -r #pkg_name Remove the #pkg_name package

e -p #pkg_name Remove the #pkg_name package and config files s u -c #pkg_name View content of a package y n a

-L #pkg_name List location of files to be installed r o f

--unpack #pkg_name Will unpack the hole package without install or configure it. e l b

i --configure #pkg_name Will reconfigure a already unpacked package s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Installing and roll black with YUM e s u In this Lab we are going to search for a package, install it, run to check if it is well installed, and roll back y n a

the installation to remove the package and clean the system. r o f e l

b [ root@server ] # yum search // Search for a package named gimp i s n [ root@server ] # yum info gimp // Get info for this package o p s [ root@server ] # yum install gimp // Install the package gimp e r

d l e h

[ root@server ] # gimp & // Execute gimp in background e b

t o n [ root@server ] # yum history // Look for history of installed/managed packages by yum n a c

[ root@server ] # yum history info 2 // Look for information about a executed command of yum n o i history s s i [ root@server ] # yum history undo 2 // Reverse the installation of a yum command in the history m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Installing and roll back with APT-CAHCE / GET e s u In this Lab we are going to search for a package, install it, run to check if it is well installed, and roll back y n a

the installation to remove the package and clean the system. r o f e l

b [ root@server ] # apt-cache search gimp // Search for a package named gimp i s n [ root@server ] # apt-cache show gimp // Get information for this package o p s [ root@server ] # apt-get install gimp // Install the package gimp e r

d l e h

[ root@server ] # gimp & // Execute gimp in background e b

t o n [ root@server ] # apt-get autoremove gimp // Remove the package and all its dependencies n a c

[ root@server ] # apt-get clean // Clean the system after installing and deleting the n o i package s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Partitioning File System e s u Achievements y n a r

o f e l b i s Knowing the difference between MBR and GPT n o p s e r Knowing how to create partitions d l e h

e Knowing how to make format to a partition b t o n

n Knowing how to use a formated partition a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Main Commands e s u Partitioning y n a r o f

e # fdisk l b i s n

o Hard disks can be divided into one or more logical disks called partitions. This division is described in the p s

e needs at least one partition, namely for its root file system. It can use swap files and/or swap parti tions, b r d l Intel compatible hardware, the BIOS that boots the system can often only access the first 1024 cylinders e h e b

For this reason people with large disks often create a third partition, just a few MB large, typi cally mounte t o n is accessible to the BIOS. n a c

n Reference: https://www.debian.org/releases/woody/i386/fdisk.txt o i s s i # gdisk m m o

C GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition table e h t an MBR carrier partition to the newer Globally Unique Identifier (GUID) Partition Table (GPT) format, or w d n table and then exits. a

, r o h

t GPT fdisk operates mainly on the GPT headers and partition tables; however, it can and will generate a f u a created an unusual protective MBR, such as a hybrid MBR created by gptsync or gdisk's own hybrid MBR e h t

require you to understand the distinctions between the main and backup data, as well as between the GP f o y l

n Reference: http://www.rodsbooks.com/gdisk/gdisk.html o s w e i v

e h t s t File System c e l f e r

When the system is correctly formated, we have to make a File System in order to store data and use n o i the partition in an operationg systems (ext4, xfs for GNU/Linux, NTFS for Windows and HFS+ for MAC). t a c i l b u p

. # mkfs -t ext4 /dev/vdb1 ) s / i 0 h . T 4

/ . # mkfs -t xfs /dev/vdb2 a n s o - i y s s b i / s m e

s m n o e c C i

l / n Using partition with FS a g r e o p . o s r n u o

E # blkid partition

m e m h t o

c # mount partition folder m e o v r i t f

a t e r # umount folder r o c p / / p : s u s p

t t h t h blkid is for seeing the identificator of the partition and check if it is created, it can be used to mount the i ( w ”

l partition by its ID. d a e n d o . i n t n u i

a the mount and umount command puts our partitioned block into a folder where we are able to see, or f e

n r r n e e e disconnect (logically) the partition. t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u In this Lab we are going to create and mount a partition, and when the partition is mounted we will create y n a

a file inside the mounted partition, checking that if we umount the partition, and optionally mount it again, r o f

we will see the file inside again. e l b i s n o

p [ root@server ] # gdisk -l /dev/vda // List the partitions of the hard drive s e r

[ root@server ] # gdisk /dev/vda // Create the partition in the hard drive d l e n → [ new] h

e 1 → [default] b t o Enter → [first sector] n n a +500M → [last sector, size of partition] c

n Enter → [default type – 83 Linux] o i s s

i w → [save and exit] m Y → [validate, save and exit] m o C e h

t [ root@server ] # partprobe /dev/vda // Persist the changings made in the drive d n a

, r [ root@server ] # mkfs -t xfs /dev/vda1 // Create a file system and be able tconsult, create an o h t

u a

e [ root@server ] # blkid /dev/vda1 // Check the partition h t f o y l [ root@server ] # mount /dev/vda1 /mnt // Mount the partition into a folder n o [ root@server ] # ls /mnt // List the content of the mounted partition s w e [ root@server ] # touch /mnt/test.txt // Create a file in the mounted folder i v

e [ root@server ] # ls /mnt // check that the file has been created h t

s [ root@server ] # umount /mnt // Disconnect logically the partition t c e l [ root@server ] # ls /mnt // Check that nothing is in the folder f e r n o i t a // c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Users Groups e s u Achievements y n a r

o f e l b i s Understand the User and Group concept n o p s e r Knowing the differences between user types d l e h

e Knowing the main files b t o n

n Knowing how to create, delete and block users a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Main Commands e s u User commands y n a r

o id: To know about the identificator of the user id (UID) and group id (GID) f e l b i useradd: Command for creating new users or update default new user information. s n o p s usermod: Command for modifying the user information. e r d l e userdel: Command for deleting the user from the system database. h e b

t groupadd: Command for adding a user into a specific group. o n n a c n

o # id i s s i m # useradd m o

C # usermod e h t # userdel d n a

, r # groupadd o h t u a e h t

f o y l Groups n o s w groupadd: Command for creating new groups. e i v e

h groupmod: Command for modifying a group definition on the system. t s t c e

l groupdel: Command for deleting a specific group. f e r n o # id i t a c # groupadd i l b

u # groupmod p

. ) s / i # groupdel 0 h . T 4

/ . a n s o

- i y s s b i / s m e Main Files s m n o e c C i

l / n /etc/passwd a g r e o p

. /etc/shadow o s r n u

o /etc/group E

m e m h t o

c m e o v r i t f

a t e

r /etc/passwd r o c p / / p : s u s p

t t h t h Is the most important, is where users of the system are recorded, i ( w ”

l d a e

n d o . i n t n u i

a student: x: 1001: 1001 :: /home/student: /bin/bash f e

n r r n e e e t h e t n b I

d s e 0 a .

n The structure is: i h 4

a ) t e

8 , , , , n k i 5 o l 8 c

A 5 n e 1 r

o 0 i a - t h a 2

S No numbers at the beginning of a user name allowed. 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h An "x" indicates that the password is stored in /etc/shadow, in the case of a "!" Is that the t t S

t f E A o - user is locked. If you have "!!" it is that it hasn't password stored.

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t

Each user carries a non-identifier (uid) from 0 (root) and some 65,535 are reserved for root c C y e a e j (always zero), and various services to users of the system. v o m i r

t p h a

c e s i i r h h C T w “ Red hat and derivatives between 1 and 499.

e Debian and derivatives between 1 and 999. s u y n a r o - group id, each user has a primary group id, but can belong to more groups. f e l b i s

n The folder used as the user's home, will be loaded by default at the login. o p

s e r Service users and users with limited permissions must have no shell, for example log on d l e

h console, it is usually left with /usr/bin /nologin or /bin/false e b t

o n n a c

n o i s s i /etc/shadow m m o

C This file store encrypted passwords and gives us information about expiration and account validity. e h t d n [Sudo] password for student: a

, r student: $ 6 $ OrqRmooe $ 2XSkIJNgd3Te / xPUd6S1wcysNgPhFfT7UFHkbmvjECkt / o h t

u L9Z3rmqBUbRDBcfLf4sz / Z775X.WgJTaijVG7mhn1: 15754: 0: 99999: 7 ::: a

e h t f <1> <2> <3> <4> <5> <6> o y l n

o s

w User name. e i v e

h t s t Well, that ... c e l f e r n o i 1-Days Since 01/01/1970 where the password was last changed. t a c i l

b u p

. 2- The minimum number of days between password changes. ) s / i 0 h . T 4

/ . a n s o - i y

s 3-day maximum validity of the account. s b i / s m e s

m n o e c C i

4-Days warning before password expires. l / n a g r e o p

. o s r n u

o 5- days after a password expires want to disable the account E

m e m h t o

c m e o v

r i 6- expiration date. days from 01.01.1970, where the account is disabled and the user can not log t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u In this Laboratory we will create some users, log in as those users, modify and some functionallities y n a

about the usermod command. r o f e l

b [ student@server ] $ useradd walter i s n [ student@server ] $ su - o p s [ root@server ] # useradd walter ; useradd dexter e r

d [ root@server ] # su - walter l e h

[ walter@server ] $ id e b

t [ walter@server ] $ su - dexter o n [ walter@server ] $ exit n a c

[ root@server ] # passwd walter n o i [ root@server ] # passwd dexter s s i [ root@server ] # su - walter m m

o [ walter@server ] $ su - dexter C

e [ dexter@server ] $ id h t [ dexter@server ] $ exit d n a

[ root@server ] # groupadd series , r o

h [ root@server ] # usermod -aG series walter t u a [ root@server ] # usermod -aG series dexter e h t [ root@server ] # su - dexter f o

[ dexter@server ] $ id y l n [ dexter@server ] $ exit o s [ root@server ] # usermod -L dexter ; exit w e i

v [ student@server ] $ su - dexter e h

t [ student@server ] $ su - s t

c [ root@server ] # su - dexter; exit e l f [ root@server ] # usermod -U dexter e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n Preknowledge s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o

p Make usage of the command man for searching about the paramaters that appear in the . o s r n

u Lab for better understanding (Hint* man usermod) o E

m e m h t o

c m e o v r i t f

Look for parameters like -a, -G, for what are they used for? a t e r r o c p / / p : s u s p

t t h t h i

( And -L and -U? w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Permissions e s u Linux/Unix operating systems have the ability to multitask in a manner similar to other operating systems. y n a

However, Linux’s major difference from other operating systems is its ability to have multiple users. Linux r o f

was designed to allow more than one user to have access to the system at the same time. In order for e l b this multiuser design to work properly, there needs to be a method to protect users from each other. This i s n is where permissions come in to play. o p s e r d l e h

e Achievements b t o n n a c n o

i Knowing the folder hierarchy s s i m

m Files and folders management o C e h Access management t d n a

, r For further information: https://www.linode.com/docs/tools-reference/linux-users-and-groups o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Generic Folder Hierarchy e s u Absolute path / Relative path y n a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t

s t c e l f e r / – Root n o i t a

c Every single file and directory starts from the root directory. i l b Only root user has write privilege under this directory. u p

. ) s Please note that /root is root user’s home directory, which is not same as /. / i 0 h . T 4

/ . a n s o - /bin – User Binaries i y s s b i / s m e

s Contains binary executables. m n o e c

C Common linux commands you need to use in single-user modes are located under this directory. i

l / n a g Commands used by all the users of the system are located here. r e o p . o s For example: ps, ls, ping, grep, cp. r n u o E

m e m h t /sbin – System Binaries o

c m e o v r i t f

a Just like /bin, /sbin also contains binary executables. t e r r o c p

/ But, the linux commands located under this directory are used typically by system aministrator, for / p : s u

s system maintenance purpose. p

t t h t h i For example: iptables, reboot, fdisk, ifconfig, swapon ( w ”

l d a e n d o . i n /etc – Configuration Files t n u i a f e

n r r n e e e t h e t Contains configuration files required by all programs. n b I

d s e 0

a . This also contains startup and shutdown shell scripts used to start/stop individual programs. n i h 4

a ) t e For example: /etc/resolv.conf, /etc/logrotate.conf 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a /dev – Device Files - t h a 2 S 0 - m 2 r n o o A Contains device files. f i t n K i u -

b These include terminal devices, usb, or any device attached to the system. 1 e i 0 r h t t S

t For example: /dev/tty1, /dev/usbmon0 f E A o -

s 1 e - n d 5 o a 1

m /proc – Process Information 0 m

2 m e (

o b t c C y e

a Contains information about system process. e j v o m i r

t

p This is a pseudo filesystem contains information about running process. For example: /proc/{pid} h a

c e s i i r h h directory contains information about the process with that particular pid. C T w “ This is a virtual filesystem with text information about system resources. For example:

e /proc/uptime s u y n a

/var – Variable Files r o f e l

b var stands for variable files. i s n Content of the files that are expected to grow can be found under this directory. o p s This includes — system log files (/var/log); packages and database files (/var/lib); emails e r

d (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots l e h

(/var/tmp); e b t o n /tmp – Temporary Files n a c n o i Directory that contains temporary files created by system and users. s s i Files under this directory are deleted when system is rebooted. m m o C /usr – User Programs e h t d n

a Contains binaries, libraries, documentation, and source-code for second level programs.

, r o /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look h t u under /usr/bin. For example: at, awk, cc, less, scp a e

h /usr/sbin contains binary files for system administrators. If you can’t find a system binary under t f

o /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel y l /usr/lib contains libraries for /usr/bin and /usr/sbin n o

s /usr/local contains users programs that you install from source. For example, when you install w e i apache from source, it goes under /usr/local/apache2 v e h t s t /home – Home Directories c e l f e r

Home directories for all users to store their personal files. n o i

t For example: /home/john, /home/nikita a c i l b u /boot – Boot Loader Files p

. ) s / i 0 h . T 4

/ Contains boot loader related files. . a n s o - i Kernel initrd, vmlinux, grub files are located under /boot y s s b i /

s For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic m e s m n o e c C i

l /lib – System Libraries / n a g r e o p . o s r Contains library files that supports the binaries located under /bin and /sbin n u o E

m Library filenames are either ld* or lib*.so.* e m h t o For example: ld-2.11.1.so, libncurses.so.5.7 c m e o v r i t f

a t e r /opt – Optional add-on Applications r o c p / / p : s u s p

opt stands for optional. t t h t h i (

Contains add-on applications from individual vendors. w ”

l d a add-on applications should be installed under either /opt/ or /opt/ sub-directory. e n d o . i n t n u i a f e

n r r n

e /mnt – Mount Directory e e t h e t n b I

d s e 0 a .

n Temporary mount directory where sysadmins can mount filesystems. i h 4

a ) t e 8 n k i 5 o l 8 c

A

5 /media – Removable Media Devices n e 1 r o 0 i a - t h a 2 S 0 -

m Temporary mount directory for removable devices. 2 r n o o A f i For examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for t n K i u -

b 1 e

i CD writer 0 r h t t S

t f E A o -

s 1 e - n /srv – Service Data d 5 o a 1 m 0 m

2 m e (

o b

t srv stands for service. c C y e a e j Contains server specific services related data. v o m i r

t p h a

For example, /srv/cvs contains CVS related data. c e s i i r h h C T w “

e s

u For deeper information consult: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux- y n Filesystem-Hierarchy.html a r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Main Commands e s u Folder and files y n a r o

f $ pwd e l

b $ mkdir i s n $ cd o p s $ ls e r d l e h

$ touch e b

t $ vi o n n a c

$ mv n o i $ cp s s i m m pwd: This command tells us where we are locate in the file system, which directory. o C e h mkdir: This command is for creating folders in file system. t d n a

, cd: This command is used to navigate through folder in Terminal. r o h t u ls: List the content of a folder a e h t touch: Create a file f o y l n vi: Edit the file o s w

e mv: Move files or folders through the file system i v e h t cp: Copy files and folders through file systems s t c e l f e r n o i t a c i l Permissions b u p

. ) s / i 0 h $ ls -l . T 4

/ .

a $ chown n s o - i y s $ chmod s b i / s m e s m n

o ls -l: e c C i

l / n a g r e To view the permissions on a file or directory, issue the command ls -l . Remember o p . o s r to replace the information in the < > with the actual file or directory name. Below is sample output for the n u o E

m ls command: e m h t o

c m e -rw-r--r-- 1 root root 1031 Nov 18 09:22 /etc/passwd o v r i t f

a t e r r o The first ten characters show the access permissions. The first dash (-) indicates the type of file (d for c p / / p : directory, s for special file, and - for a regular file). The next three characters (rw-) define the owner’s s u s p

t t h permission to the file. t h i ( w ”

l d a e n d o . i n t n u i a f e

n Permissions and Owners r r n e e e t h e t n b I

d The chmod and chown commands are used to control access to files in UNIX and Linux systems. s e 0 a . n i h 4

a ) t e

8 The chmod command stands for "change mode", and allows changing permissions of files and folders, n k i 5 o l 8 c

A also known as "modes" in UNIX. The chown command stands for "change owner", and allows changing 5 n e 1 r o 0 i a

- t the owner of a given file or folder, which can be a user and a group. That's the difference between them h a 2 S 0 - m in a nutshell. 2 r n o o A f i t n K i u - They are interrelated in so far as changing ownership of a file changes who the set permissions apply to. b 1 e i 0 r h t t S

t The new owner inherits the permissions. f E A o -

s 1 e - n d 5 o Let's take a quick look at the basic usage of these commands. a 1 m 0 m

2 m e (

o b t

c C y e a e j v o m i r

t chmod: The chmod command can be used in a couple of different ways, with permissions (or modes) p h a

c e s i i r set by numbers or by letters. Permissions can be given to a user who owns the file (u = user), group of h h C T w “ said user (g = group), everyone else (o = others) or all users (a). And the basic permissions that can be

e given include read (r), write (w), and execute (x). There are also X, s, and t, but they're less commonly s u used and required an advance knowledge. y n a r o When using numbers you can use a numeric value such as 644 to set permissions. The position of the f e l value represents to whom is the permission given, and the actual value represents which (or how much) b i s

n permissions are given as a sum total of each permission's unique value. o p s e

r First position (in the above example 6) refers to the user. Second refers to the group of the user, and the d l

e third refers to all others. h e b

t Numeric values for permissions are: o n n a 4 = read 2 = write 1 = execute c n o i s So a value of 4 will only give read rights, but a value of 6 will give read and write rights because it is a s i

m sum of 4 and 2. 5 will give only read ane execute rights, and 7 will give all rights. Do this calculation for m o each numerical position and you'll end up with the desired value. So in the example of 644 we're giving C

e the user who owns the file the permission to read and write (but not execute), the group of that user the h t

d permission to read only, and others the right to read only as well. n a

, r o To set this mode with chmod on a file called important.txt we would simply run this command: h t u a

e chmod 644 important.txt h t f o Note that making a file executable, if it were a script or a program, amounts to simply giving someone or y l n everyone a permission to execute. If this was an important.sh bash script we could allow the owner to o s

w execute, and others to read with the 744 mode, or everyone to execute with 755. e i v e

h chmod 755 important.sh t s t c e Now, we can also use letters to accomplish the same thing, and we've already mentioned the relevant l f e r letters above. This is probably easier to remember than using numbers. For example, to accomplish n o i the 644 permissions above we would run this: t a c i l b chmod u+rw,go+r important.txt u p

. ) s / i 0 h So we're saying file owner user gets read and write permissions, group and others get to read. . T 4

/ . a n s o -

i The second example, with the important.sh file being made executable we could just run this: y s s b i / s m e

s chmod u+rwx,go+rx important.sh m n o e c C i

l / n If important.sh already had permissions set to 644 we can add everyone execute rights by simply a g r e o p

. running: o s r n u o E

m chmod +x important.sh e m h t o

c m e Not specifying the letter for anyone is treated as if we said "a", for all. o v r i t f

a t e r r o Finally, if we're setting permissions to a folder we need to specify the -R option (standing for c p / / p : s u "recursive"): s p

t t h t h i (

w chmod -R 644 important-files/ ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h chown: Basic usage of chown is pretty straightforward. You just need to remember that first comes the e t n b I

d s e

0 user (owner), and then the group, delimited by a colon. a . n i h 4

a ) t e 8 n k

i This command will set the user "daniel", from the group of "admins" as owners of the directory 5 o l 8 c

A 5

n "important-files": e 1 r o 0 i a - t h a 2 S 0 - m chown -R daniel:admins important-files 2 r n o o A f i t n K i u - Just like with chmod, the -R is there when it's a directory. b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y

e The references stands here: a e j v o m i r

t p h a

c e s https://www.kernel.org/doc/man-pages/licenses.html i i r h h C T w “ https://www.linode.com/docs/tools-reference/linux-users-and-groups e s

u https://linux.die.net/man/1/chmod y n a

r https://linux.die.net/man/1/chown o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u In this lab we will create a folder, list it, create files and change permissions. y n a r o

f [ root@server ] # mkdir -p /cinema/series e l

b [ root@server ] # ls -l /cine i s n [ root@server ] # chown -R :series /cinema o p s [ root@server ] # chmod -R 775 /cinema e r

d [ root@server ] # ls -l /cine l e h

[ root@server ] # su - dexter e b

t [ dexter@server ] $ id o n [ dexter@server ] $ cd /cinema/series n a c

[ dexter@server ] $ mkdir -p dexter/Season1 n o i [ dexter@server ] $ cd dexter s s i [ dexter@server ] $ touch Chapter1.txt m m

o [ dexter@server ] $ ls -l C

e [ dexter@server ] $ mv Chapter1.txt Season1 h t [ dexter@server ] $ ls -l d n a

[ dexter@server ] $ cd Season1 , r o

h [ dexter@server ] $ ls -l t u a [ dexter@server ] $ chmod o-r Chapter1.txt e h t [ dexter@server ] $ ls -l f o

[ dexter@server ] $ exit y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Network e s u Relevant information regarding the configuration and administration of network interfaces, networks and y n a

network services in RHEL based Systems and Debian based Systems. It is oriented towards system r o f

administrators with a basic understanding of Linux and networking. e l b i s n o p s e Achievements r d l e h

e b t o n Knowing the basic concepts of IPv4 network n a c n

o Knowing the basic concept of devices and conection i s s i m Knowing how to create connections and configuring devices m o C e

h Knowing methods and tools for detect incidences t d n a

, References: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html- r o h

t single/Networking_Guide/ u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Commands and files RHEL based Systems e s u Network: IP/Mask, Gateway and DNS RHEL based y n a r o

f # ip addr [ show | add ] e l

b # ip route [ show | add ] i s n o p s # nmcli con [ show | add | mod ] e r

d # nmcli con [ up | down ] l e h

e b

t $ ping IP o n $ dig FQDN n a c

$ tracepath FQDN n o i s s i m m o

C Table to explain the concepts of the command ip: e h t d

n Show information for all a

ip addr , r addresses o Display IP Addresses and property h t u addr information a

e ip addr show dev Display information only for h (abbreviation of address) t f em1 device em1 o y l n o

s Show information for all

w ip link e

i interfaces v e h t

Manage and display the state of all s t ip link show dev Display information only for c link network e l

f em1 device em1 e interfaces r n o i t a c ip -s link Display interface statistics i l b u p

. ) s / i 0 h

. List all of the route entries in T 4

/ route ip route . Display and alter the routing table a n the kernel s o - i y s s b i / s m e s m

n Reference: o e c C i

l https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf / n a g r e o p . o s r n u o E

m e Now we are going to explain the nmcli command: m h t o

c m e o v ******************** r i t f

a t e r r o

c p / / p : s u s p

t t h Main files t h i ( w ”

l d a e n d o . i n /etc/sysconfig/network-scripts/ifcfg-nombre t n u i a f e

n r r n e e e t h /etc/sysconfig/network e t n b I

d s e 0 a . n

i /etc/resolv.conf h 4

a ) t e 8 n k i 5 o l 8 c /etc/hosts

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e

i The structure of the file: /etc/sysconfig/network-scripts/ifcfg-nombre 0 r h t t S

t f E A o -

s 1 One of the most common interface files is , e /etc/sysconfig/network-scripts/ifcfg-eth0 - n d 5 o a

1 which controls the first Ethernet network interface card or m 0 m

2 m e (

o b t

c C NIC y e a e j v o m i r

t p h a in the system. In a system with multiple NICs, there are multiple ifcfg-ethX files (where X is a c e s i i r h h C unique number corresponding to a specific interface). Because each device has its own configuration T w “ file, an administrator can control how each interface functions individually. e s u The following is a sample file for a system using a fixed IP address:

ifcfg-eth0 y n a

r DEVICE=eth0 o f

e BOOTPROTO=none l b i

s ONBOOT=yes n o

p NETMASK=255.255.255.0 s e r

IPADDR=10.0.1.27 d l e USERCTL=no h e b t

o The values required in an interface configuration file can change based on other values. For example, n n

a the ifcfg-eth0 file for an interface using DHCP looks different because IP information is provided by c

n the o DHCP server: i s s i

m DEVICE=eth0 m o BOOTPROTO=dhcp C

e ONBOOT=yes h t

d n a

, r o h BOOTPROTO=protocol t u a

where protocol is one of the following: e h t f o none — No boot-time protocol should be used. y l n

o bootp — The BOOTP protocol should be used. s

w dhcp — The DHCP protocol should be used. e i v e h t =address

BROADCAST s t c where address is the broadcast address. This directive is deprecated, as the value is calculated e l f e automatically with ipcalc. r n o DEVICE=name i t a c where name is the name of the physical device (except for dynamically-allocated PPP devices i l b

u where it is the logical name). p

. ) s / i DHCP_HOSTNAME=name 0 h . T 4

/ where name is a short host name to be sent to the DHCP server. Use this option only if the DHCP . a n s o - i server requires the client to specify a host name before receiving an IP address. y s s b i /

s =answer

m DHCPV6C e s m n

o where answer is one of the following: e c C i

l / n a g r e yes — Use DHCP to obtain an IPv6 address for this interface. o p . o s r n no — Do not use DHCP to obtain an IPv6 address for this interface. This is the default value. u o E

m e m h t o An IPv6 link-local address will still be assigned by default. The link-local address is based on the c m e o v r i MAC address of the interface as per RFC 4862. t f

a t e r r o DHCPV6C_OPTIONS=answer c p / / p : where answer is one of the following: s u s p

t t h t h i ( w

” -P — Enable IPv6 prefix delegation.

l d a e n

d -S — Use DHCP to obtain stateless configuration only, not addresses, for this interface. o . i n t n u i a f

e -N -T -P

— Restore normal operation after using the or options. n r r n e e e t h e t -T — Use DHCP to obtain a temporary IPv6 address for this interface. n b I

d s e 0 a . -D — Override the default when selecting the type of DHCP Unique Identifier (DUID) to n i h 4

a ) t e

8 use. n k i 5 o l 8 c

A 5 n e 1 r o 0 i a By default, the DHCP client (dhclient) creates a DHCP Unique Identifier (DUID) based on the link- - t h a 2 S 0 - m layer address (DUID-LL) if it is running in stateless mode (with the -S option, to not request an 2 r n o o A f i

t address), or it creates an identifier based on the link-layer address plus a timestamp (DUID-LLT) if n K i u -

b 1 e i it is running in stateful mode (without -S, requesting an address). The -D option overrides this 0 r h t t S

t f E A o

- LL default, with a value of either or LLT.

s 1 e - n d 5 o a 1 m 0 m

2 m

e DNS{1,2}=address (

o b t c C y where address is a name server address to be placed in provided that the

e /etc/resolv.conf a e j v o m i r

t PEERDNS directive is not set to no. p h a

c e s i i r h

h C T w “ This information and more can be found at: https://docs.fedoraproject.org/en-

e US/Fedora/15/html/Deployment_Guide/s1-networkscripts-interfaces.html s u y n a r o f /etc/sysconfig/network file content (gateway, hostname and DNS): e l b i s The configuration of the Gateway, Hostname is exactly the same. We will specify our hostname and the n o p gateway in the following file: s e r d l vi /etc/sysconfig/network e h e b

t o n NETWORKING=yes n a c

HOSTNAME=testing n o i GATEWAY=192.168.1.1 s s i m And the DNS is better to configure, instead of the /etc/resolv.conf, inside of the interface config file. m o C

e vi /etc/resolv.conf h t d n a

# Generated by NetworkManager , r o h t u

a e h # No nameservers found; try putting DNS servers into your t f o

# ifcfg files in /etc/sysconfig/network-scripts like so: y l n # o s # DNS1=xxx.xxx.xxx.xxx w e i # DNS2=xxx.xxx.xxx.xxx v e

h # DOMAIN=lab.foo.com bar.foo.com t s t c e l f e r n o /etc/hosts file content: i t a c i l

b This file is a simple text file that associates IP addresses with hostnames, one line per IP address. For u p

. each host a single line should be present with the following information: IP_address canonical_hostname ) s / i 0 h

. [aliases...] T 4

/ . a n s o - i

y # The following lines are desirable for IPv4 capable hosts s s b i /

s 127.0.0.1 localhost m e s m n o e c C i

l /

n # 127.0.1.1 is often used for the FQDN of the machine a g r e o

p 127.0.1.1 thishost.mydomain.org thishost . o s r n

u 192.168.1.10 foo.mydomain.org foo o E

m e 192.168.1.13 bar.mydomain.org bar m h t o

c 146.82.138.7 master.debian.org master m e o v r i t f 209.237.226.90 www.opensource.org

a t e r r o c p / / p :

s # The following lines are desirable for IPv6 capable hosts u s p

t t h ::1 localhost ip6-localhost ip6-loopback t h i ( w ” ff02::1 ip6-allnodes l d a e n

d ff02::2 ip6-allrouters o . i n t n u i a f e

n r r n e

e The follow link will help you in further understanding: http://man7.org/linux/man-pages/man5/hosts.5.html e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u y

n Configuring connections a r o f

e [ root@server ] # ip addr show dev eth1 l b i

s [ root@server ] # ip addr add 10.0.0.X/24 dev eth1 n o [ root@server ] # ip addr show dev eth1 p s e r d l

e [ root@server ] # nmcli con show h

e b t o [ root@server ] # nmcli con add con-name local-net ifname eth1 type ethernet autoconnect no ip4 n n a 10.0.10.X/24 gw4 10.0.10.1 c

n [ root@server ] # nmcli con show o i s s i m [ root@server ] # nmcli con up local-net m o

C [ root@server ] # ip addr show dev eth1 e h [ root@server ] # nmcli con down local-net t d

n [ root@server ] # ip addr show dev eth1 a

, r o h t [ root@server ] # nmcli con mod xarxa-local +ipv4.addresses 10.0.20.X/24 ipv4.dns 8.8.8.8 u a

e [ root@server ] # nmcli con up local-net h t

f [ root@server ] # ip addr show dev eth1 o y l [ root@server ] # cat /etc/resolv.conf n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Commands and files Debian based Systems e s u Network: IP/Mask, Gateway and DNS y n a r o

f # ip addr [ show | add ] e l

b # ip route [ show | add ] i s n o p s Adding to /etc/network/interfaces e r

d auto eth0 l e h

iface eth0 inet dhcp //Getting ip address by DHCP e b

t o n //if static is wanted, an example is shown below n a c

auto eth0 n o i iface eth0 inet static s s i Address 192.168.1.25 m m

o netmask 255.255.255.0 C

e Broadcast 192.168.1.255 h t Network 192.168.1.0 d n a

Gateway 192.168.1.1 , r o

h t u a $ ping IP e h t $ dig FQDN f o

$ tracepath FQDN y l n o s w e i v

e Table to explain the concepts of the command ip: h t s t c e Show information for all l f ip addr e r addresses Display IP Addresses and property n o i t addr information a c i ip addr show dev Display information only for l (abbreviation of address) b u em1 device em1 p

. ) s / i 0 h . T 4

/ . Show information for all a n s

o ip link - i y

s interfaces s b i / s m e s

m Manage and display the state of all n o e ip link show dev Display information only for c C i

link network l / n em1 device em1 a g r e interfaces o p . o s r n u o E

m ip -s link Display interface statistics e m h t o

c m e o v r i t f

a t List all of the route entries in e r

r route Display and alter the routing table ip route o c p / the kernel / p : s u s p

t t h t h i ( w

l d a e n d o . i n

t Main files n u i a f e

n r r n e e e t h e t n b I

d

s /etc/network/interfaces e 0 a . n i h 4

a /etc/resolv.conf ) t e 8 n k i 5 o l /etc/hosts 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t /etc/hosts f E A o -

s 1 e - n d 5 o This file is used for name resolution of machines on the local network. Just as DNS is used to resolve a 1 m 0 m

2 Internet domain names (i.e. translate the domain name into an IP address that your computer can use to m e (

o b t c C

y communicate with a distant computer), the file is used to resolve the names of computers

e hosts a e j v o m i r

on your local network. In addition to having a line for each of the other computers on your internal t p h a

c e s i i r network, you have to have one for the computer that the hosts file is on (the "local" computer). For h h C T w “ example, if you accepted the default host name of "debian" during the installation, the hosts file entry for

e the local system would be: s u y n a r o f 192.168.10.10 debian.mylastname.net debian e l b i s n o p s e r

You will also see a "localhost" entry with an IP address of 127.0.0.1 which is called the "loopback" d l e address. It has an interface designation of lo when you use the ifconfig/ip command. The h e

b loopback address is a TCP/IP standard found on all systems no matter their OS. It is used for testing. If t o you can successfully ping the loopback address it indicates that your TCP/IP stack is properly n n a

c configured. If you can ping the IP address of the NIC that's in the computer you're on (the local system) it n

o indicates that the NIC and TCP/IP stack are both OK. i s s i m

m o C e /etc/host.conf h t

d This file is what you use to tell the system what to use to resolve host (computer) and domain names. n a

,

r The most common possible selections are: o h t u a hosts - look for host names and addresses in the /etc/hosts file e h t bind - use the DNS server(s) specified in /etc/resolv.conf f o

y nis - Network Information System - kind of an internal network version of DNS used on large l n o Linux/UNIX networks s w e i v e h t The order in which the above possible selections are listed is the order in which they are used. For s t c example, you should always list "hosts" first so your system doesn't go out to the Internet trying to find a e l f

e system that's on your local network. If using the first method doesn't resolve the name, the next entry is r

n tried. Running NIS on your network is no small feat so if you don't know if you should use NIS or not o i t a you're probably not running it so you don't need the "nis" entry. As a result, the important line in this file c i l b is: u p

. ) s / i 0 h . T 4

/ . a n s o - /etc/resolv.conf i y s s b i / s m e s m n o e As noted above, this is the file you use to enter your DNS server information. Unless you have your own c C i

l / n

a Internet DNS server, this file will contain information about your ISP. g r e o p . o s r n u o E

m e m h search yourisp.com t o

c m e nameserver 172.25.188.66 o v r i t f

a t nameserver 172.25.188.77 e r r o c p / / p : s u Your ISP's domain and DNS server IP addresses would be entered in place of the blue entries above. s p

t t h t h i ( w ”

l What about having your own Internet DNS server? Bad idea. First of all, when you register a domain d a e n d o .

i name with someone like Network Solutions you're required to enter the IP addresses for two DNS n t n u i a f e

n

r servers. This is because DNS is critical. If it fails no one will be able to "find" (get the IP address of) your r n e e e t h e t n

Web, e-mail, or other Internet servers. Thats why a proper DNS server setup includes two servers with b I

d s e 0 a . two different addresses (for redundancy). And since an ISP will typically only allocate a few static IP n i h 4

a ) t e addresses to you, using two of them just for DNS isn't very efficient. If you need DNS records for an 8 n k i 5 o l 8 c

Internet Web or e-mail server, check with your ISP. They will usually host your DNS records on their DNS A 5 n e 1 r o 0 i a servers for a small one-time setup fee. If they don't or the cost is prohibitive, check with a third party like - t h a 2 S 0 - m that listed on our DNS page 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 /etc/network/interfaces e - n d 5 o a 1 m 0 m

2 This file contains the IP information that your system uses to work with the NIC(s). There is a parent m e (

o b t

c C entry for each NIC, and the information for the NIC is listed underneath it like so: y e a e j v o m i r

t p h a

c e s i i r h h C T w “ auto eth0

e iface eth0 inet static s u address 192.168.10.10 y n a

netmask 255.255.255.0 r o f

network 192.168.10.0 e l b broadcast 192.168.10.255 i s n gateway 192.168.10.1 o p s e r d l e h

Note that the above would be appropriate for an internal LAN interface. Also note that the "network" (aka e b

t "wire") and broadcast addresses for the network the system is on are also listed. o n n a c Be careful about using the gateway setting. This should only be used if you truly do have a gateway n o i s router that leads off your network, most likely to the Internet. (A proxy server or firewall is one such type s i

m of router.) Having a default gateway address in the NIC configuration when you don't have a default m o gateway router will cause problems if your try and connect to the Internet using a modem. (See the C

e Modems page for more information on this.) h t d n a

, As you will see on the Internet Servers page, the Apache Web server software allows you to host any r o h number of Web sites on a single server by setting up a "virtual host" for each domain (Web site). For t u a example, if you wanted to use your system to host the Web sites www.shoes4men.com and e h t www.shoes4ladies.com you would set up a virtual host for each in the Apache configuration file. f o

y However, in order to use an SSL certificate to conduct secure financial transactions you would need a l n o unique IP address for each of these domains, but at the same time you only have one NIC connected to s w your broadband connection. No problem. You just create a "virtual interface" for each domain. e i v e h t You create virtual interfaces by creating an additional parent entry in the /etc/network/interfaces s t c

e file for each virtual interface. Where the above only had one parent entry for the NIC, we create multiple l f e r parent entries for each virtual interface append the actual interface designation with a colon (:) and the n o i number 1 or higher. For example: t a c i l b u p

. ) s auto eth0 / i 0 h . T 4

/ . a n s o

- iface eth0:1 inet static i y s s b i / address 172.30.156.115 s m e s

m netmask 255.255.255.240 n o e c C

i network 172.30.156.112

l / n a g r

e broadcast 172.30.156.127 o p . o s

r gateway 172.30.156.1 n u o E

m e m h t o iface eth0:2 inet static c m e o v address 172.30.156.116 r i t f

a t e r netmask 255.255.255.240 r o c p /

/ network 172.30.156.112 p : s u s p

t broadcast 172.30.156.127 t h t h i (

gateway 172.30.156.1 w ”

l d a

e n d o . i n t n u i a f e

n r r n Notice the entry. This indicates that most of the address is the network address. Only the last e netmask e e t h e t n b I

4 bits of the last octet identify the computer. That only allows for 16 computer addresses (actually only 14 d s e 0 a . n i h 4 are usable due to the wire and broadcast addresses)

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y

e a e j v o m i r

t p h a

c e s More precisely, because the IP addresses are in the Class B address range, the first two octets are the i i r h h C

T w “ network portion of the address and the third octet and the first half (4 bits) of the fourth octet are the subnet portion of the address. Subnets are created by "borrowing" some of the computer bits in an

e address and using them to identify sub-networks. Naturally, this leaves you with fewer computer bits so s u you must have fewer computers on a subnet. y n a r o f

This is something that ISPs routinely do. They will take their public address space and subnet it into a lot e l b

i of small public subnets. These small public subnets are then assigned to business customers looking for s n

o static IP addresses. p s e r d l Looking at a subnet mask will give you some idea of a networks size. The higher the numbers in the e h subnet mask: e b t o n n a c the more bits that are used to identify the network/subnet portion of an IP address n o i

s the more networks (subnets) there are in the address space s i

m the smaller these individual networks will be (fewer number of computers per network) m o C

e h t d n a

, r Reference: http://www.aboutdebian.com/network.htm o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u Configuring connections y n a r o

f [ root@server ] # ip addr show dev eth1 e l

b [ root@server ] # ip addr add 10.0.0.X/24 dev eth1 i s n [ root@server ] # ip addr show dev eth1 o p s e r

d [ root@server ] # sudo vi /etc/network/interfaces l e h

e b

t ## To configure a dynamic IP address o n auto eth0 n a c

iface eth0 inet dhcp n o i s s i ## Or configure a static IP m m

o auto eth0 C

e iface eth0 inet static h t address 192.168.1.14 d n a

gateway 192.168.1.1 , r o

h netmask 255.255.255.0 t u a network 192.168.1.0 e h t broadcast 192.168.1.255 f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Processes e s u Achievements y n a r

o f e l b i s Knowing the concepts of redirections I/O and pipes n o p s e r Knowing how to monitor the processes consumtion d l e h

e Knowing how to stop a process in memory b t o n

n Knowing the NICE concept and how to add it to a process and renice a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Basic Commands e s u

y $ echo texte [ > | >> ] file.txt n a

r $ ls -l /etc | grep pattern o f e l b i $ ps -ef s n o $ pgrep -l -u student p s e

r $ top d l

e h

e $ kill PID b t

o $ killall pattern n n

a $ pkill pattern c

n o i s s $ nice -n num program i m $ renice -n num PID m o C e h t d n a Type the following ps command to display all running process:

, r o # ps aux | less h t u a

e h t f Where, o y l n o -A: select all processes s w

e a: select all processes on a terminal, including those of other users i v

e x: select processes without controlling ttys h t s t c

e l f e r

n Task: see every process on the system o i t a c i # ps -A l b u # ps -e p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b Task: See every process except those running as root i / s m e s m n

o # ps -U root -u root -N e c C i

l / n a g

r e o p . o s r n u

o Task: See process run by user vivek E

m e m h t o

c # ps -u vivek m e o v r i t f

a t ask: Print a process tree using ps e r r o c p / / p : s u # ps -ejH s p

t t h t h

i # ps axjf ( w ”

l d a e n d o . i n t n u i a f e

n r r n Task: Get info about threads e e e t h e t n b I

d s e 0 Type the following command: a . n i h 4

a ) t e 8 n k i

5 o l 8 c

A 5 n e

1 # ps -eLf r o 0 i a - t h a 2 # ps axms S 0 - m 2 r n o o A f i t

n K i u -

b 1 e i 0 r h t t S

t Task: Get security info f E A o -

s 1 e - n d 5 o

a Type the following command: 1 m 0 m

2 m e (

o b t c C y e a e j v o # ps -eo euser,ruser,suser,fuser,f,comm,label m i r

t p h a

c e s # ps axZ i i r h h C

T w “ # ps -eM

e s

u y n a

r pgrep: Use pgrep command. pgrep looks through the currently running processes and lists the process o f IDs which matches the selection criteria to screen. For example display firefox process id: e l b i s n o p s $ pgrep firefox e r d l e h e b Sample outputs: t o n n 3356 a c n o i s s i m Following command will list the process called sshd which is owned by a user called root: m o C

$ pgrep -u root sshd e h t

d n a

, r o

h top: t u a

e The easiest way to find out what processes are running on your server is to run the top command. The h t f top chunk of information give system statistics, such as system load and the total number of tasks. o y l n

o s w e i Linux and Unix-like operating system come with the kill command to terminates stalled or unwanted v

e processes without having to log out or restart the server. The kill command sends the specified signal h t s t such as kill process to the specified process or process groups. If no signal is specified, the TERM signal c e l

f is sent. e r n o i t Common Term signals a c i l b u Linux and Unix-like operating system supports the standard terminate signals listed below: p

. ) s / i 0 h . T 4

/ . SIGHUP (1) – Hangup detected on controlling terminal or death of controlling process. Use a n s o - i

y SIGHUP to reload configuration files and open/close log files. s s b i /

s (9) – Kill signal. Use SIGKILL as a last resort to kill process. This will not save data or

m SIGKILL e s m n

o cleaning kill the process. e c C i

l / n SIGTERM (15) – Termination signal. This is the default and safest way to kill process. a g r e o p . o s r n

u pidof: This command can give you the PID of the running process. o E

m e m h t o

c m e o v r i t f

a t e

r kill command syntax: r o c p / / p : s u s p

t kill [signal] PID t h t h i (

kill -15 PID w ”

l d a e kill -9 PID n d o . i n t n u i kill -SIGTERM PID a f e

n r r n e e e kill [options] -SIGTERM PID t h e t n b I

d

s e 0 a . n i h 4

a ) t e 8 n k i

5 Rules are simple: o l 8 c

A 5 n e 1 r o 0 i a

- t You can kill all your own process. h a 2 S 0 - m 2 r Only root user can kill system level process. n o o A f i t n K Only root user can kill process started by other users. i u -

b 1 e i 0 r h t t S

t f E

A o -

s 1 e - n d 5 o a 1 How do I verify that the process is gone / killed? m 0 m

2 m e (

o b t c C

y Use the ps or pidof command: e a e j v o m i r

t $ ps aux | grep lighttpd p h a

c e s i i r $ pidof lighttpd h h C T w “

e s u A note about sending stronger signal # 9 (SIGKILL) y n a

r If no signal specified in the kill command, signal # 15 (SIGTERM), is sent by default. So the kill 3486 o f

e command is same as the following command: l b i s # kill -15 3486 n o p # kill -SIGTERM 3486 s e r

OR d l e

h $ sudo kill -15 3486 e b

$ sudo kill -SIGTERM 3486 t o n n a c n o i

s Sometime signal # 15 is not sufficient. For example, lighttpd may not be killed by signal #15 due to s i

m open sockets. In that case process (PID) # 3486 would be killed with the powerful signal # 9: m o # kill -9 3486 C

e # kill -SIGKILL 3486 h t

d OR n a

,

r $ sudo kill -9 3486 o h t $ sudo kill -SIGKILL 3486 u a e h t f o y l n killall command o s w e i This is a Linux only command. to kill processes by name. So no need to find the PIDs using the ‘pidof v e

h process’ or ‘ps aux | grep process’ command. t s t c e

l f e r

n o i t a c i l nice: runs command COMMAND with an adjusted "niceness", which affects process scheduling. A b u

p process with a lower niceness value is given higher priority and more CPU time. A process with a higher

. ) s / i 0 h niceness value (a "nicer" process) is given a lower priority and less CPU time, freeing up resources for . T 4

/ .

a processes which are more demanding. n s o - i y s s b i / Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). s m e s m n o e c C i

l / n a g r e o p

. -nN, --adjustment=N add integer N to the niceness (default is 10) o s r n u o E

--help display a help message and exit. m e m h t o

c --version output version information and exit. m e o v r i t f

a t e r

r o c p / / p : s u s p

Example: nice -n13 firefox& t t h t h i ( w ”

l d a e n d o . i n t n u i renice: alters the scheduling priority of one or more running processes. a f e

n r r n e e e t h e t n A higher value of priority actually makes the process lower priority; it means that the process will demand b I

d s e 0 a .

n fewer system resources (and therefore is a "nicer" process). A lower priority value means that the i h 4

a ) t e

8 process will demand more resources, possibly denying those resources to processes that are "nicer". n k i 5 o l 8 c

A 5 n e 1 r

o renice'ing a process group causes all processes in the process group to have their scheduling priority 0 i a - t h a 2

S altered. 0 - m 2 r n o o A f i t n K renice'ing a user causes all processes owned by the user to have their scheduling priority altered. i u -

b 1 e i 0 r h t t S

t

f E A o -

s 1 e - n d 5 o a

1 Example: renice [-n] priority [[-p] pid who...] [[-g] pgrp who...] [[-u] user who...] m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c

e -n, --priority The scheduling priority of the process, process group, or user. s i i r h h C T w “ -g, --pgrp Force who parameters to be interpreted as process group ID's. e s -u, --user Force the who parameters to be interpreted as user names. u y n

a -p, --pid Resets the who interpretation to be (the default) process ID's. r o f -v, --version Display version information, and exit. e l b i s

n -h, --help Display a help message, and exit. o p s e r d l e h e b renice examples t o n n a # renice +1 987 -u daemon root -p 32 c n o i s Change the priority of process IDs 987 and 32, and all processes owned by users daemon and root, to s i

m be one greater (+1, one increment "nicer") than its current value. m o C e h t d

n References: a

, r o

h https://en.wikipedia.org/wiki/Nice_(Unix) t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u This Lab will test the basic commands of management and priority of processes. y n a r o

f [ student@server ] $ firefox & e l

b [ student@server ] $ pgrep -l -u student | grep fire i s n [ student@server ] $ pkill firefox o p s [ student@server ] $ pgrep -l -u student | grep fire e r

d l e h

[ student@server ] $ nice -n 10 -calculator & e b

t [ student@server ] $ ps axo pid,comm,nice --sort=nice o n [ student@server ] $ renice -n 15 PID n a c

[ student@server ] $ ps axo pid,comm,nice --sort=nice n o i [ student@server ] $ renice -n 15 PID s s i [ student@server ] $ ps axo pid,comm,nice --sort=nice m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Services e s u Achievements y n a r

o f e l b i s Knowing the service concept n o p s e r Knowing how to start/stop services d l e h

e Knowing the target concept b t o n

n Knowing how to isolate and default target a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Basic commands e s u Basics y n a r o

f # systemctl --type=service e l

b # systemctl [ status | start | stop ] servei.service i s n # systemctl enable servei.service o p s e r

d # systemctl isolate [ multi-user.target | graphical.target ] l e h

# systemctl get-default e b

t # systemctl set-default [ multi-user.target | graphical.target ] o n n a c

# systemctl [ poweroff | reboot ] n o i s s i m m o

C systemctl: is a systemd utility which is responsible for Controlling the systemd system and service e h manager. t d n a

, Systemd is a collection of system management daemons, utilities and libraries which serves as a r o

h replacement of System V init daemon. Systemd functions as central management and configuration t u a

platform for UNIX like system. e h t f

o y l n o Systemctl accepts services (.service), mount point (.mount), sockets (.socket) and devices (.device) as s w units. e i v e

h t s t c e

l Types: f e r n o i Service units: t a c i l b u

p A unit configuration file whose name ends in .service

. ) s / i 0 h encodes information about a process controlled and . T 4

/ . a n supervised by systemd. s o - i y s s b i /

s systemd service units are the units that actually executes and keeps track of programs and daemon, and m e s m n

o dependencies are used to make sure that services are started in the right order. They are the most e c C i

l / n commonly used type of units. a g r e o p . o s r n u o E

m e m h t o Socket units: c m e o v r i t f

a t e r

r A unit configuration file whose name ends in ".socket" o c p / / p : encodes information about an IPC or network socket or a file s u s p

t t h system FIFO controlled and supervised by systemd, for t h i ( w ”

l socket-based activation. d a e n d o . i n t n u i a f socket units on the other hand don't actually start daemons on their own, instead they just sit there and e

n r r n e e e t h listen on an ip and a port, or a UNIX domain socket, and when something connects to it the daemon that e t n b I

d

s the socket is for is started and the connection is handed to it. e 0 a . n i h 4

a ) t e 8 n k This is useful for making sure that big daemons that take up a lot of resources but is used rarely aren't i 5 o l 8 c

A 5 running and taking up resources all the time, but instead are only started when needed. n e 1 r o 0 i a - t h a 2 S

0 - m 2 r n o o A f i t n K i u -

b 1 e Target units: i 0 r h t t S

t f E A o -

s 1 e - n

d A unit configuration file whose name ends in ".target" 5 o a 1 m 0 m

encodes information about a target unit of systemd, which is 2 m e (

o b t c C

y used for grouping units and as well-known synchronization e a e j v o m i r

points during start-up. t p h a

c e s i i r h h C T w “ Targets are used for grouping and ordering units. They are somewhat of a rough equivalent to runlevels

e in that at different targets different services, sockets, and other units are started. Unlike runlevels they s u are much more free-form and you can easily make your own targets for ordering units, and targets have y n a

dependencies among themselves. r o f e l For instance, multi-user.target is what most daemons are grouped under, and it requires basic.target b i s

n to already be activated, which means that all services grouped under basic.target will be started before o p s the ones in multi-user.target. e r d l e h e b t Status: o n n a c To check the status of a service on your system, you can use the status command: n o i s s

i systemctl status application.service m m o This will provide you with the service state, the cgroup hierarchy, and the first few log lines. C e h t For instance, when checking the status of an Nginx server, you may see output like this: d n a

, r

o ● nginx.service - A high performance web server and a reverse proxy server h t u Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor pre a e

h Active: active (running) since Tue 2015-01-27 19:41:23 EST; 22h ago t f o Main PID: 495 (nginx) y l n CGroup: /system.slice/nginx.service o s ├─495 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; w e i

v └─496 nginx: worker process e h t s t c Jan 27 19:41:23 desktop systemd[1]: Starting A high performance web server an e l f e Jan 27 19:41:23 desktop systemd[1]: Started A high performance web server and r n o i t

a This gives you a nice overview of the current status of the application, notifying you of any problems and c i l

b any actions that may be required. u p

. ) s / i 0 h . T 4

/ . a n s

o Checking services: - i y s s b i / s m e Here are also methods for checking for specific states. For instance, to check to see if a unit is currently s m n o e active (running), you can use the is-active command: c C i

l / n a g r e o p systemctl is-active application.service . o s r n u o E

m This will return the current unit state, which is usually active or inactive. The exit code will be "0" if it e m h t o is active, making the result simpler to parse programatically. c m e o v r i t f

a t To see if the unit is enabled, you can use the is-enabled command: e r r o c p / / p : s u systemctl is-enabled application.service s p

t t h t h i ( w ” This will output whether the service is enabled or disabled and will again set the exit code to "0" or l d a e n

d "1" depending on the answer to the command question. o . i n t n u i a f e

n r r n

e e e t h e t n b I

d s e 0

a . Isolating Targets: n i h 4

a ) t e 8 n k i 5 o

l It is possible to start all of the units associated with a target and stop all units that are not part of the 8 c

A 5 n e 1

r dependency tree. The command that we need to do this is called, appropriately, isolate. This is similar o 0 i a - t h a 2 to changing the runlevel in other init systems. S 0 - m 2 r n o o A f i t n K For instance, if you are operating in a graphical environment with graphical.target active, you can i u -

b 1 e i 0 r h shut down the graphical system and put the system into a multi-user command line state by isolating the t t S

t f E A o -

multi-user.target. Since graphical.target depends on multi-user.target but not the s 1 e - n d 5 o

a other way around, all of the graphical units will be stopped. 1 m 0 m

2 m e (

o b t

c C y e a e j v o m i r

t

p Getting and Setting the Default Target h a

c e s i i r h h C T w “ The systemd process has a default target that it uses when booting the system. Satisfying the cascade

e of dependencies from that single target will bring the system into the desired state. To find the default s u

y target for your system, type: n a r o

f systemctl get-default e l b i s multi-user.target n o p s e r

If you wish to set a different default target, you can use the set-default. For instance, if you have a d l e graphical desktop installed and you wish for the system to boot into that by default, you can change your h

e default target accordingly: b t o n n sudo systemctl set-default graphical.target a c n o i s s i m Shut down system or Reboot: m o C e To initiate a full shutdown, you can use the command:

h poweroff t d n a

sudo systemctl poweroff , r o h t u A restart can be started with the reboot command: a e h t

f sudo systemctl reboot o y l n o

s w e i v

Main folders e h t s t c /usr/lib/systemd/system/ e l f

e /etc/systemd/system/ r n o i t

a c i l b u Unit files in the earlier directories override later ones. This is a useful scheme, because it lets you make p

. ) s / i changes in the /etc directory, where configuration is expected. You should avoid making changes 0 h . T 4

/ . in /usr. Your system installs package data there that’s not expected to change. a n s o - i y s s b i / systemd can also run in a user context, and manage resources per user in addition to system-side. Unit s m e

s files for user units are stored similarly in /etc/systemd/user, m n o e c C /run/systemd/user, and /usr/lib/systemd/user. The order of precedence works similarly. i

l / n a g r e o p

. o s r n u o E

m References: e m h t o

c m e http://unix.stackexchange.com/questions/159462/what-is-systemds-target-service-and-socket o v r i t f

a t e r r o https://fedoramagazine.org/systemd-getting-a-grip-on-units/ c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u Service management and target changing y n a r o

f [ root@server ] # yum install httpd -y e l

b [ root@server ] # ls /usr/lib/systemd/system/ | grep httpd i s n o p s [ root@server ] # systemctl status httpd.service e r

d [ root@server ] # ss -tlp | grep http l e h

e b

t [ root@server ] # systemctl start httpd.service o n [ root@server ] # systemctl status httpd.service n a c

[ root@server ] # ss -tlp | grep http n o i [ root@server ] # firefox http://localhost & s s i m m

o [ root@server ] # systemctl enable httpd.service C

e [ root@server ] # systemctl status httpd.service h t d n a

[ root@server ] # systemctl stop httpd.service , r o

h [ root@server ] # systemctl status httpd.service t u a [ root@server ] # ss -tlp | grep http e h t f o

[ root@server ] # systemctl isolate multi-user.target y l n [ root@server ] # systemctl isolate graphical.target o s [ root@server ] # systemctl get-default w e i

v [ root@server ] # systemctl set-default multi-user.target e h

t [ root@server ] # systemctl reboot s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Secure Remote Access e s u Achievement y n a r

o f e l b i s Knowing how ssh works n o p s e r Knowing how to acces through ssh d l e h

e Knowing how to execute commands through ssh b t o n

n Copying files between machines through ssh a c n o i Knowing how to generate SSH Certificates s s i m m Securing remote acces using ssh o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Basic commands e s u OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to y n a

eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large r o f

suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration e l b options. i s n o p s e r d l Remote Access e h e b t $ ssh student@serverX o n n a c

n $ ssh student@serverX 'echo I am from serverX > ~Desktop/serverX.txt' o i s s i

m m o C

Comunication e h t d n $ scp source-local-folder user@server:destination-remote-folder a

, r $ scp user@server:source-remote-folder destination-local-folder o h t

u a

e $ rsync source-local-folder user@server:destination-remote-folder h t f $ rsync user@server:source-remote-folder destination-local-folder o y l n o $ rsync source-local-folder destination-local-folder s w e i v e h t s t

c Secure Shell: e l f e r

ssh (SSH client) is a program for logging into a remote machine and for executing commands on a n o i t remote machine. It is intended to provide secure encrypted communications between two untrusted a c i

l hosts over an insecure network. X11 connections, arbitrary TCP ports and UNIX-domain sockets can b u also be forwarded over the secure channel. p

. ) s / i 0 h . T

4 ssh connects and logs into the specified hostname (with optional user name). The user must prove

/ . a n s o

- his/her identity to the remote machine using one of several methods (see below). i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s scp: r n u o E

m e It copies files between hosts on a network. It uses ssh for data transfer, and uses the same m h t o

c authentication and provides the same security as ssh. scp will ask for passwords or passphrases if they m e o v r i t f are needed for authentication.

a t e r r o c p / /

p File names may contain a user and host specification to indicate that the file is to be copied to/from that : s u s p

t host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating t h t h i (

file names containing ‘:’ as host specifiers. Copies between two remote hosts are also permitted. w ”

l d a e n d o .

i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a .

n Rsync: i h 4

a ) t e 8 n k i 5 o l 8 c

rsync is a utility that keeps copies of a file on two computer systems. It is commonly found on Unix-like A 5 n e 1 r o 0 i a systems and functions as both a file synchronization and file transfer program. The rsync algorithm is a - t h a 2 S 0 - m type of delta encoding, and is used to minimize network usage. Zlib may be used for additional 2 r n o o A f i

t compression, and SSH or stunnel can be used for data security. n K i u -

b 1 e i 0 r h t t S

t Rsync is typically used to synchronize files and directories between two different systems. For example, f E A o -

s 1

e if the command rsync local-file user@remote-host:remote-file is run, rsync will use SSH - n d 5 o a 1

m to connect as user to remote-host. Once connected, it will invoke the remote host's rsync and then 0 m

2 m e (

o b the two programs will determine what parts of the file need to be transferred over the connection. t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ References: e s

u http://man.openbsd.org/OpenBSD-current/man1/scp.1 y n a

r http://man.openbsd.org/OpenBSD-current/man1/ssh.1 o f e l

b https://en.wikipedia.org/wiki/Rsync i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u Remote access and secure comunication y n a r o

f [ student@serverA ] $ ssh student@serverX e l

b [ student@serverX ] $ id i s n [ student@serverX ] $ exit o p s e r

d [ student@serverA ] $ ssh student@serverX 'echo Soy de serverX > ~/Desktop/serverX.txt' l e h

[ student@serverA ] $ ssh student@serverX 'ls ~/Desktop ; cat ~/Desktop/serverX.txt' e b

t o n n a c

[ student@serverA ] $ mkdir ~/Desktop/comu n o i [ student@serverA ] $ touch ~/Desktop/comu/serverX s s i [ student@serverA ] $ cd ~/Desktop/comu m m

o [ student@serverA ] $ rsync -aR . student@serverX:~/Desktop/comu/ C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Certificates e s u Generate SSH Certificate y n a r o

f $ ssh-keygen -t rsa e l

b i s n $ Enter file in which to save the key (/home/demo/.ssh/id_rsa): [Enter] o p s e r

d $ Enter passphrase (empty for no passphrase): [Enter] l e h e b

t o n n a Securing remote access c n o i s

s $ ssh-copy-id [email protected] // Copy ssh file from we create it recently to i m // the destination computer which we want m o // get access to, through certificates C e

h ------t

d $ sudo nano /etc/ssh/sshd_config n a

, r [...] o h t PasswordAuthentication no // Configuring ssh like this, we only accept u a

e PermitRootLogin no // connections that comes from public keys h t f o

y l n o

s ssh-keygen: w e i v It generates, manages and converts authentication keys for ssh. ssh-keygen can create RSA keys for e h t use by SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. The type of key s t c e to be generated is specified with the -t option. If invoked without any arguments, ssh-keygen will l f e r generate an RSA key for use in SSH protocol 2 connections. n o i t a ssh-keygen is also used to generate groups for use in Diffie-Hellman group exchange (DH-GEX). See c i l

b the MODULI GENERATION section for details. u p

. ) s / i Normally each user wishing to use SSH with RSA or DSA authentication runs this once to create the 0 h . T 4

/ . authentication key in ~/.ssh/identity, ~/.ssh/id_dsa or ~/.ssh/id_rsa. Additionally, the system administrator a n s o - i y

s may use this to generate host keys, as seen in /etc/rc. s b i / s m e s

m Normally this program generates the key and asks for a file in which to store the private key. The public n o e c C i

key is stored in a file with the same name but ''.pub'' appended. The program also asks for a passphrase. l / n a g r e The passphrase may be empty to indicate no passphrase (host keys must have an empty passphrase), o p . o s r or it may be a string of arbitrary length. A passphrase is similar to a password, except it can be a phrase n u o E

m with a series of words, punctuation, numbers, whitespace, or any string of characters you want. Good e m h t o passphrases are 10-30 characters long, are not simple sentences or otherwise easily guessable (English c m e o v prose has only 1-2 bits of entropy per character, and provides very bad passphrases), and contain a mix r i t f

a t e r of upper and lowercase letters, numbers, and non-alphanumeric characters. The passphrase can be r o c p / /

p changed later by using the -p option. : s u s p

t t h t h i ( w ”

l d a e n -t type d o . i n t n u i

a Specifies the type of key to create. The possible values are ''rsa1'' for protocol version 1 and ''rsa'' or f e

n r r n e e e ''dsa'' for protocol version 2. t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h

a ssh-copy-id: 2 S 0 - m 2 r n o o A f i

t ssh-copy-id is a script that uses ssh to log into a remote machine (presumably using a login password, n K i u -

b 1 e

i so password authentication should be enabled, unless you've done some clever use of multiple 0 r h t t S

t f

E identities) It also changes the permissions of the remote user's home, ~/.ssh, and A o -

s 1 e - n

d ~/.ssh/authorized_keys to remove group writability (which would otherwise prevent you from logging in, 5 o a 1 m 0 m if the remote sshd has StrictModes set in its configuration). If the -i option is given then the identity file

2 m e (

o b t (defaults to ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in your ssh-agent. c C y e a e j v o m i r

t

p Example: ssh-copy-id [-i [identity_file]] [user@]machine h a

c e s i i r h h C

T w “ References: e s

u https://linux.die.net/man/1/ssh-keygen y n a

r https://linux.die.net/man/1/ssh-copy-id o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Laboratory e s u Generating SSH Cert and securing access y n a r o f

e [ student@serverA ] $ ssh-keygen -t rsa l b i s Generating public/private rsa key pair. n o

p Enter file in which to save the key (/home/demo/.ssh/id_rsa): s e r

Enter passphrase (empty for no passphrase): d l e Enter same passphrase again: h e

b Your identification has been saved in /home/demo/.ssh/id_rsa. t o Your public key has been saved in /home/demo/.ssh/id_rsa.pub. n n a The key fingerprint is: c n

o 4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a i s s i The key's randomart image is: m +--[ RSA 2048]-+ m o

C | .oo. | e h t | . o.E | d n | + . o | a

, r | . = = . | o h t

u | = S = . | a

e | o + = + | h t f | . o + o . | o y l | . o | n o

s | | w e

i +------+ v e h t

[ student@serverA ] $ ssh-copy-id [email protected] s t c The authenticity of host '123.45.67.89 (12.34.56.78)' can't be established. e l f e RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12. r n

o Are you sure you want to continue connecting (yes/no)? yes i t a

c Warning: Permanently added '123.45.67.89' (RSA) to the list of known hosts. i l b [email protected]'s password: u p

. ) s Now try logging into the machine, with "ssh '[email protected]' ", and check in: / i 0 h . T

4

/ . a n s o

- ~/.ssh/authorized_keys i y s s b i / s m e s

m to make sure we haven't added extra keys that you weren't expecting. n o e c C i

l / n a g r e [ student@serverA ] $ vim /etc/ssh/sshd_config o p . o s r [...] n u o E

m PasswordAuthentication no e m h t o PermitRootLogin no c m e o v r i t f

a t e r [ student@serverA ] $ systemctl restart sshd r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Red Hat Certificate Program e s u Red Hat offers different level of certification programs. Certifications can be validated through Red Hat y n a

webpage and expire after 3 years. r o f e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C Red Hat Certified System Administrator (RHCSA) T w “ RHCSA is an entry-level certification that focuses on actual competencies at system administration,

e including installation and configuration of a Red Hat Enterprise Linux system and attach it to a live s u network running network services. y n a r

o f To achieve the RHCSA certification the student must pass EX200, a 2.5-hour hands-on lab exam. The e l b i minimum passing score for the exam is 210 out of 300 possible points (70%). There is no prerequisite for s n o the exam, but Red Hat recommends preparing for the exam by taking courses in Red Hat System p s e Administration (RH124 or RH134) if one does not have previous experience. r d l e h Red Hat Certified Engineer (RHCE) e b t o Self-titled "the flagship" certification, RHCE is a mid to advanced-level certification that builds on topics n n a

c covered in the RHCSA certification to include more advanced topics such as security and installing n

o [11] i common enterprise networking (IP) services. To achieve the RHCE certification, the student must s s i pass the RHCSA exam, EX200, and in addition EX300, a 3.5-hour hands-on lab exam. Red Hat m m recommends preparing for the exam by taking courses in Linux essentials (RH033), Linux administration o C

e (RH131 or RH133), and Linux networking and security (RH253) if one does not have previous h t experience. Previous real-world experience is also advised. d n a

, r o h t u a Red Hat Certified Architect (RHCA) e h t f o

Self-titled "the capstone certificate", RHCA is the most complete certificate in the program, adding an y l n enterprise-level focus. o s w

e There are concentrations inside the RHCA: i v e h t

Datacenter: skills with tasks common in an on-premise datacenter s t c

e Cloud: skills with tasks common to cloud infrastructure l f e

r Devops: skills and knowledge in technologies and practices that can accelerate the process of n o moving applications and updates from development through the build and test processes and on i t a c to production i l b Application Development: skills in enterprise application development, integration, and u p

. ) s

/ architecture i 0 h . T 4

Application Platform: skills with tasks common for building and managing tools and applications / . a n s o - i y s s b i / s m e s m

n Red Hat Certified Virtualization Administrator (RHCVA) o e c C i

l / n a g RHCVA is a certification that focuses on Virtualization administration. To achieve the RHCVA certification r e o p . o s the student must pass EX318 described above. There is no prerequisite for the exam, but Red Hat r n u o

E recommends preparing for the exam by taking the respective course RH318. The exam also requires

m e m h

t knowledge in using and installing Microsoft Windows operating systems. o

c m e o v r i t f

a t e r r o c p / / p : JBoss Certified Application Administrator (JBCAA) s u s p

t t h t h i

( JBCAA is a certification that focuses on managing the JBoss Enterprise Application Platform. To achieve w ”

l d

a the JBCAA certification the student must pass EX336, a four-hour hands-on lab exam. There is no e n d o . i n prerequisite for the exam, but Red Hat recommends preparing for the exam by taking course JB336, a t n u i a f e

n r

r four-day course in JBoss application administration. n e e e t h e t n b I

d s

e 0 a . n i h 4

a ) t e 8 n k

i 5 o l 8 c

A 5 n e 1 r o 0 i a

- t Examination required for each certification h a 2 S 0 - m 2 r n o o

A f i t n K i u -

b 1 e i 0 r h t t S

t RHCA: f E

A RHCA: o -

s 1 e RHCA: RHCA: Enterprise - n d 5 o Name RHCSA RHCE RHCA Application a 1 m 0

m Cloud Datacenter application

2 m e platform (

o b t developmen c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ EX200 - Red e s

u Hat® Certified y n System Yes Yes Yes Yes Yes Yes No a r o

f Administrator e l b (RHCSA) Exam i s n o p EX210 - Red s e r Hat Certified d l e h System e b

t Administrator in No No Any 5 No Any 5 No No o n n Red Hat a c

n OpenStack o i s s exam i m m

o EX220 - Red C

e Hat Certificate h t

d of Expertise in n

a No No Any 5 Yes Any 5 No No

, r Hybrid Cloud o h t Management u a e exam h t f o EX225 - Red y l n o

Hat Certified s w

e JBoss No No No No No No Yes i v

e Developer h t s t (RHCJD) exam c e l f e EX234 - Red r n o

i Hat Certificate t a c i of Expertise in l b u

p Application No No Any 5 Yes No No Any 5

. ) s / i 0 h Server . T 4

/ . a n Management s o - i y s s b exam i / s m e s m n

o EX236 - Red e c C i

l / n Hat Certificate a g r e o p . of Expertise in No No Any 5 No Any 5 Any 5 No o s r n u o

E Hybrid Cloud

m e m h t

o Storage exam

c m e o v r i t f EX248 - Red

a t e r r o

c Hat Certified p / / p : s u s

p JBoss No No Any 5 Yes No Any 5 Any 5

t t h t h i ( Administrator w ”

l d a

e exam n d o . i n t n u i a f e

n EX270 - Red r r n e e e t h e t n Hat Certificate b I

d s e 0 a . n of Expertise in i h 4

a

) No No No No No No No t e 8 n k Container i 5 o l 8 c

A 5 n e Management 1 r o 0 i a - t h a 2 exam S 0 - m 2 r n o o A f i t

n EX276 - Red K i u -

b 1 e i 0 r h Hat Certificate t t S

t f E A o -

of Expertise in s 1 e - n d 5 o a

1 Containerized No No Any 5 No No No No m 0 m

2 m e (

o Application b t c C y e a e j Development v o m i r

t p h a exam c e s i i r h h C T w “ EX280 - Red e s

u Hat Certificate y n of Expertise in No No Any 5 Yes Any 5 No No a r o

f Platform-as-a- e l b Service exam i s n o p EX297 - Red s e r Hat Certificate d l e h of Expertise in No No Any 5 No No No Any 5 e b

t Persistence o n n exam a c n o EX300 - Red i s s i Hat Certified m No Yes Yes Yes Yes Yes No m

o Engineer C

e (RHCE) Exam h t d n EX310 - Red a

, r o Hat Certified h t No No Any 5 No Any 5 No No u

a Engineer in Red e h t Hat OpenStack f o y l EX318 - Red n o

s Hat Certified w e i Virtualization No No Any 5 No Any 5 Any 5 No v e h

t Administrator s t c (RHCVA) Exam e l f e r EX342 - Red n o i t Hat Certificate a c i l of Expertise in b u p

. Red Hat ) s / i 0 h . T

4 Enterprise No No Any 5 No No Any 5 No

/ . a n s o - Linux i y s s b i /

s Diagnostics and m e s m n

o Troubleshooting e c C i

l / n exam a g r e o p . o s r EX401 - Red n u o E

m Hat Certificate e m h t o

c of Expertise in m e o v r i t f Enterprise

a t e r No No Any 5 No Any 5 Any 5 No r o

c Deployment p / / p : s u s

p and Systems

t t h t h i ( Management w ”

l d a

e Exam n d o . i n t n u i a f e

n EX405 - Red r r n e e e t h e t n Hat Certificate b I

d s e 0 a . n of Expertise in i h 4

a

) No No Any 5 No Any 5 Any 5 No t e 8 n k Configuration i 5 o l 8 c

A 5 n e Management 1 r o 0 i a - t h a 2 with Puppet S 0 - m 2 r n o o A f i t

n EX407 - Red K i u -

b 1 e i 0 r h Hat Certificate t t S

t f E A o -

of Expertise in No No No No Any 5 No No s 1 e - n d 5 o a

1 Ansible m 0 m

2 m e (

o Automation b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ EX413 - Red e s

u Hat Certificate y n of Expertise in No No Any 5 No No Any 5 No a r o

f Server e l b Hardening i s n o p EX421 - Red s e r Hat Certificate d l e h of Expertise in

e No No Any 5 No No No Any 5 b

t Camel o n n Development a c

n exam o i s s i EX427 - Red m m

o Hat Certificate C

e of Expertise in h t No No Any 5 No No No Any 5

d Business n a

, r Process Design o h t exam u a e h t EX436 - Red f o Hat Certificate y l n o

of Expertise in s w

e Clustering and No No Any 5 No No Any 5 No i v

e Storage h t s t Management c e l f Exam e r n o

i EX442 - Red t a c i Hat Certificate l b u

p of Expertise in No No Any 5 No No Any 5 No

. ) s / i 0 h Performance . T 4

/ . a n Tuning Exam s o - i y s s b i /

s EX450 - Red m e s m n

o Hat Certificate e c C i

l / n of Expertise in a g r e No No Any 5 Yes No No Any 5 o p . Data o s r n u o

E Virtualization

m e m h t

o exam

c m e o v r i t f EX453 - Red

a t e r r o

c Hat Certificate p / / p : s u s

p of Expertise in

t t h No No Any 5 No No No Any 5 t h i ( Fast-Cache w ”

l d a

e Application n d o . i n t n u i

a Development f e

n r r n e e e t h e t n EX465 - Red b I

d s e 0 a . n Hat Certificate i h 4

a ) t e 8 n k of Expertise in No No Any 5 No No No Any 5 i 5 o l 8 c

A 5 n e Business Rules 1 r o 0 i a - t h a 2 exam S 0 - m 2 r n o o A f i t n K i u

-

b 1 e i 0 r h t t S

t f

E Reference: https://en.wikipedia.org/wiki/Red_Hat_Certification_Program A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Sources e s u Sources y n a r

o https://www.gnu.org/ is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International f e l License. b i s n o https://fedoraproject.org/wiki/Docs_Project?rd=DocsProject All documentation produced by Fedora is p s e released under the Creative Commons Attribution-Share Alike License 3.0 Unported License. r d l e h

e https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html- b t

o single/Networking_Guide/ Creative Commons Attribution-ShareAlike 3.0 Unported License. n n a c

n https://www.ubuntu.com/about/about-ubuntu/ubuntu-and-debian is licensed under the Creative o i s

s Commons CC-BY-SA version 3.0 i m m o http://www.rodsbooks.com/gdisk/gdisk.html is licensed under the Creative Commons CC-BY-SA version C e

h 3.0 t

d n a

, r https://www.debian.org/releases/woody/i386/fdisk.txt GNU General Public License. o h t u a

e https://www.linode.com/docs/tools-reference/linux-users-and-groups is under a Creative Commons BY- h t

f ND 4.0 license o y l n o

http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html GNU Free s w Documentation License, Version 1.2 e i v e h t http://www.aboutdebian.com/network.htm is under a Creative Commons BY-ND 4.0 License. s t c

e l f e r https://en.wikipedia.org/wiki/Nice_(Unix) Text is available under the Creative Commons Attribution- n o ShareAlike License; i t a c i l b

u http://unix.stackexchange.com/questions/159462/what-is-systemds-target-service-and-socket is licensed p

. ) s / i under the Creative Commons CC-BY-SA version 3.0 0 h . T 4

/ . a n s o -

i https://fedoramagazine.org/systemd-getting-a-grip-on-units/ is under the terms of the Creative Commons y s s b i / Attribution-ShareAlike 3.0 Unported License s m e s m

n o e c C i https://www.openssh.com/ is under Creative Commons Attribution 4.0 International License. l / n a g r e o p . o s r

n http://man.openbsd.org/OpenBSD-current/man1/scp.1 man page u o E

m e m h t o http://man.openbsd.org/OpenBSD-current/man1/ssh.1 man page c m e o v

r i t f

a t e r https://en.wikipedia.org/wiki/Rsync is under Creative Commons Attribution-ShareAlike 3.0 Unported r o c p / / p : License. s u s p

t

t h t h i (

w https://linux.die.net/man/1/ssh-keygen man page ”

l d a e

n d o . i n t n u i

a https://linux.die.net/man/1/ssh-copy-id man page f e

n r r n e e e t h e t n https://wiki.centos.org/HowTos is licensed under a Creative Commons Attribution-Share Alike 3.0 b I

d s e 0 a .

n Unported License. i h 4

a ) t e 8 n k i 5 o l http://man7.org/linux/man-pages/man5/hosts.5.html is GNU General Public License as published by the 8 c

A 5 n e 1 r o Free Software Foundation 0 i a - t h a 2 S 0 - m 2 r n https://wiki.archlinux.org/index.php/Systemd is available under GNU Free Documentation License 1.3 or o o A f i t n K

i later unless otherwise noted. u -

b 1 e i 0 r h t t S

t f

E https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ Creative A o -

s 1 e - n Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). d 5 o a 1 m 0 m

2 m e ( https://wiki.debian.org/deb view Debian Free Software Guidelines (DFSG)

o b t c C y

e (https://www.debian.org/social_contract#guidelines) a e j v o m i r

t p h a

c e s https://www.kernel.org/doc/man-pages/licenses.html All submissions to man-pages must be licensed i i r h h C

T w “ using a license that permits the page to be freely redistributed and modified. Preferred that you use one of the following: e s u - The "verbatim" license (personal preference of the current maintainer, and seems also to have been the y n a

preference of the previous maintainer as well) r o f e l b

i - The GNU General Public License (GPL) s n o p s

e - The BSD License r d l e

h https://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/s1-networkscripts- e b

interfaces.html licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported t o n license ("CC-BY-SA") n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “ Licensed under the Creative Commons Attribution Share Alike License 4.0 e s u

y This project (2015-1-ES01-KA202-015858) has been funded with support from the European Commission. n a

r This publication reflects the views only of the author, and the Commission cannot be held responsible for o f any use which may be made of the information contained therein. e l b i s n o p s e r d l e h e b t o n n a c n o i s s i m m o C e h t d n a

, r o h t u a e h t f o y l n o s w e i v e h t s t c e l f e r n o i t a c i l b u p

. ) s / i 0 h . T 4

/ . a n s o - i y s s b i / s m e s m n o e c C i

l / n a g r e o p . o s r n u o E

m e m h t o

c m e o v r i t f

a t e r r o c p / / p : s u s p

t t h t h i ( w ”

l d a e n d o . i n t n u i a f e

n r r n e e e t h e t n b I

d s e 0 a . n i h 4

a ) t e 8 n k i 5 o l 8 c

A 5 n e 1 r o 0 i a - t h a 2 S 0 - m 2 r n o o A f i t n K i u -

b 1 e i 0 r h t t S

t f E A o -

s 1 e - n d 5 o a 1 m 0 m

2 m e (

o b t c C y e a e j v o m i r

t p h a

c e s i i r h h C T w “