SlideShare a Scribd company logo
1 of 29
Hands On LinuxHands On Linux
● Inuits
● Open Source
● http://inuits.be
● Jan Vansteenkiste
● jan@inuits.be
IntroductieIntroductie
Virtual BoxVirtual Box
● Virtuele Machine
● KVM
● Xen
● VirtualBox
● ...
● Virtual Box
● Installatie
– Windows: http://<my.ip>/
– Linux: Afhankelijk van distributie
● Ubuntu: sudo apt-get install virtualbox-ose
Virtual BoxVirtual Box
● Aanmaken nieuwe Virtuele Machine
● Configureren nieuwe machine
● Installatie Linux
Installatie LinuxInstallatie Linux
● Partitionering: Uitsplitsen?
● /var, /boot, /home, /tmp, ...
● Netwerk instellingen
● Root wachtwoord
(in ubuntu: gebruiker aanmaken & wachtwoord instellen)
● Installatie basis systeem
● Installatie van packages
● Kernel (/boot)
● Bootloader
● Grub / Lilo
Filesystem Hierarchy StandardFilesystem Hierarchy Standard
● Voorspellen locatie bestanden
● Software / OS
● Gebruikers
● Bestandsysteem
● Bestanden die kunnen gedeeld worden <->
Bestanden die NIET kunnen gedeeld worden
● Statisch <-> Variabel
Filesystem Hierarchy StandardFilesystem Hierarchy Standard
● / - 'root' filesystem – start punt voor alles
● /bin - 'binary' – uitvoerbare bestandeen (voor gebruikers)
● /boot - bestanden noodzakelijk voor booten (opstarten)
● /dev - 'devices' – speciale directory (niet aanpassen)
● /etc - '' - systeem configuratie
● /home - peresoonlijke files
● /lib - gedeelde libraries
● /lost+found – filesystem controle
● /media - verwijderbare media (usb disk, cdroms)
● /mnt - permanente mounts
● /opt - optional – externe software (bv java, ...)
Filesystem Hierarchy StandardFilesystem Hierarchy Standard
● /proc - kernel info / configuratie
● Voorbeeld: 'cat /proc/cpuinfo'
● /root - 'home' folder van root gebruiker
● /sbin - systeem binaries. Enkel beheerder heeft toegang
● /selinux- pseudo-filesysteem (zoals proc) voor selinux (security)
● /srv - plaats om bestanden aan te bieden door services
● /tmp - tijdelijke bestanden
● /usr - deelbare, -optionele) alleen-lezen data. Niet vereist om basis
systeem werkend te krijgen.
● Verder onderverdeeld in: bin, lib, sbin, ...
● /var - 'variabel' – snel veranderende data
● /var/log - log bestanden
● /var/spool - nog te verwerken bestanden (mail bv)
● ...
RunlevelsRunlevels
● Linux opstarten:
● bootloader -> kernel
● init (/etc/inittab)
– runlevels
● Runlevel bepaalt welke services opgestart
worden
● Speciale runlevels:
● 0: halt (shutdown)
● 6: reboot
● 1: single user
● 5: start grafische interface
RunlevelsRunlevels
● /etc/init.d/
● opstart scripts
● /etc/rc*.d/
● runlevel configuratie
●
symlinks (gebruik ls -l)
● Configuratie tools:
● rcconf
● service
●
chkconfig (chkconfig -l -A)
ShellShell
● Text based - Terminal
● Shell: Bash
● Prompt (username / hostname / directory)
● Build in commands:
– echo, exit, export, history, kill, ...
● Ctrl-c : afbreken
● Ctrl-r : zoeken in history
ShellShell
● Uitvoeren van commando's
● ls <opties> <argumenten>
ls --help
ls -la
● Bewegen door directory structuur
● Relatieve vs Absolute paden
– '.' '..'
– ~
– vb1: ../../folder
vb2: /path/to/folder
vb3: ~/folder/
● Commandos:
– pwd
– cd
– ls
ShellShell
● Hulp op de shell:
● commando --help
● man <commando>
q - afsluiten
/zoekstr - zoeken
– Zoek op wat '-o' doet bij het 'ls' commando
ShellShell
● Bestand & Directory operaties
● mkdir - make dir
● touch - maakt lege bestanden aan
● cp - copy
● mv - move
● rm, rmdir - remove / removedir
● cat
● less, more
cat bestand.txt | less
● find
find . -iname *.log
● Maak een volgende structuur aan (mkdir, touch)
<home-folder><home-folder>
`-- handson`-- handson
|-- nog_een_folder|-- nog_een_folder
| `-- bestand1| `-- bestand1
`-- voorbeeld`-- voorbeeld
`-- sub`-- sub
|-- file1|-- file1
|-- file2|-- file2
`-- file3`-- file3● Kopieer bestand1 naar bestand2 in dezelfde map
● ls /dev | more
ls /dev | less (ls afsluiten met 'q')
Quick solutionQuick solution
Sneller alternatief:
mkdir -p handson/voorbeeld/sub
mkdir handson/nog_een_folder
Nog sneller:
mkdir -p handson/{voorbeeld/sub,nog_een_folder}
Bestanden aanmaken mbv (bash-)scripting
for nr in `seq 1 3`; do touch handson/voorbeeld/sub/file$nr; done
mkdir handson
mkdir handson/voorbeeld
mkdir handson/voorbeeld/sub
mkdir handson/nog_een_folder
touch handson/nog_een_folder/bestand1
touch handson/voorbeeld/sub/file1
touch handson/voorbeeld/sub/file2
touch handson/voorbeeld/sub/file3
cp handson/nog_een_folder/bestand1 handson/nog_een_folder/bestand2
Text EditorsText Editors
● vi (vim = vi improved)
● commando's:
– esc - verlaat huidige mode
– i - insert mode
– x - wis karakter
– dd - wis lijn
dw - wis woord
– :q - afsluiten
:q! - geforceerd afsluiten (niet opslaan)
– :w - opslaan
:wq - opslaan en afsluiten (idem :x)
● nano
● toetsenbord combinaties onderaan: ctrl-?
Systeem commandosSysteem commandos
● ps
● kill
● top
● df
● du
● shutdown
● sudo (visudo!)
su / su <user>
sudo su <-> sudo su -
● which
● PATH variabele
Users / Groups and PermissionsUsers / Groups and Permissions
● Gebruikers
● User IDs / Group IDs
● /etc/passwd, /etc/shadow
● /etc/group, /etc/gshadow
● useradd, usermod, userdel, id, 'who am i', w
– id root
● Permissies op filesystem:
● ID, GID (numeriek)
● Bitmask
PermissiesPermissies
● drwxr-xr-x 2 handson users 4096 Nov 4 08:07 folder
● r : read
w : write
x : execute (andere betekenis bij folders)
● <user><group><other>
●
drwxr-xr-x
- : normaal bestand
d : directory
l : symbolische link
c : 'character' device (printer, tty)
b : 'block' device (disk, cdrom)
Number Binary Rights
0 000 ­­­
1 001 ­­x
2 010 ­w­
3 011 ­wx
4 100 r­­
5 101 r­x
6 110 rw­
7 111 rwx
Permissies: OctaalPermissies: Octaal
Permissies: AanpassenPermissies: Aanpassen
● chown - change owner
chgrp - change group
● chmod - change file mode bits
● voorbeelden:
●
chown handson bestand
chgrp users bestand
chown handson:users bestand
chown :users bestand
●
chmod 700 bestand
chmod u=rwx,g-rwx,o-rwx bestand
chmod a+w bestand
Software InstallatieSoftware Installatie
● RPM / DEB
● Ubuntu ~ debian
● DPKG
● .deb pakketten – binary of source
● hoofd pakket management tool
● APT - Advanced Package Tool
● Frontend voor dpkg
● Automatisch downloaden / installeren pakketten
● Aptitude
APTAPT
● /etc/apt/sources.list
● apt-get
● apt-get update
● apt-get upgrade
● apt-get install
● apt-get remove
● apt-cache
● apt-cache search
APTAPT
● Zoek een alternatief om runlevel(s) te
configureren
● Installeer een van deze programmas
● Gebruik het programma om de cron daemon te
starten (cron voert commando's uit op
geconfigureerde tijdstippen)
NetworkingNetworking
● Configuratie
● Ubuntu maakt gebruik van 'NetworkManager'
● Manuele configuratie via 'ifconfig'
– ifconfig -a - lijst alle interfaces
ifconfig eth0 - toon configuratie van eth0
– ifconfig eth0 192.168.0.1/24
● Automatische configuratie via dhcp
– dhclient eth0
● /etc/network/interfaces
– Configuratie bij het opstarten
Systeem configuratieSysteem configuratie
● /etc
● Algemene Systeem Configuratie:
– Debian: /etc/default
– Redhat: /etc/sysconfig
– ...
● Pakketten
– /etc/apache2/
– /etc/cron*
ls /etc/cron*
– ...
Remote werken via SSHRemote werken via SSH
● Belang van Encryptie
● Onveilige protocollen:
– telnet, ftp, http, pop3, imap
– voorbeeld smtp login -> 'plain' password
● Veilige alternatieven:
– ssh
ftps, https, pop3s, imaps mbv ssl (Secure Socket Library)
● SSH
●
ssh -l <user> <remote host>
● ssh-keys
ssh-keygenssh-keygen
● Aanmaken van een key pair:
● private key
● public key
●
ssh-keygen
– ~/.ssh/id_rsa
– ~/.ssh/id_rsa.pub
● Inhoud id_rsa.pub naar remote host toevoegen aan
bestand:
– ~/.ssh/authorized_keys

More Related Content

Viewers also liked

Third Generation Internet Applications
Third Generation Internet ApplicationsThird Generation Internet Applications
Third Generation Internet ApplicationsPatrick Koning
 
JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaTakipi
 
Java Virtual Machine - Internal Architecture
Java Virtual Machine - Internal ArchitectureJava Virtual Machine - Internal Architecture
Java Virtual Machine - Internal Architecturesubnesh
 

Viewers also liked (7)

Third Generation Internet Applications
Third Generation Internet ApplicationsThird Generation Internet Applications
Third Generation Internet Applications
 
Perfect Patch
Perfect PatchPerfect Patch
Perfect Patch
 
AVO-Café
AVO-CaféAVO-Café
AVO-Café
 
Boekpresentatie (HAN)
Boekpresentatie (HAN)Boekpresentatie (HAN)
Boekpresentatie (HAN)
 
JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and Scala
 
Mediawijsheid 2.0
Mediawijsheid 2.0 Mediawijsheid 2.0
Mediawijsheid 2.0
 
Java Virtual Machine - Internal Architecture
Java Virtual Machine - Internal ArchitectureJava Virtual Machine - Internal Architecture
Java Virtual Machine - Internal Architecture
 

Similar to Hands on presentatie

Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Peter Martin
 
Open Computer and Software Inventory
Open Computer and Software InventoryOpen Computer and Software Inventory
Open Computer and Software Inventory247 Invest
 
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & Vagrant
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & VagrantLinux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & Vagrant
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & VagrantPeter Martin
 
Hosted Security Online Backup supporttraining
Hosted Security Online Backup supporttrainingHosted Security Online Backup supporttraining
Hosted Security Online Backup supporttrainingMaarten Vink
 
Infra as Code workshop
Infra as Code workshopInfra as Code workshop
Infra as Code workshopMarinoDekker
 
MediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa
 
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)Avansa Mid- en Zuidwest
 
Mijn site beveiliging
Mijn site beveiligingMijn site beveiliging
Mijn site beveiligingMarko Heijnen
 
Een presentatie over PFsense
Een presentatie over PFsenseEen presentatie over PFsense
Een presentatie over PFsenseJelmer de Reus
 
CFEngine Roadshow Maiden Voyage Cohesion Techsessie
CFEngine Roadshow Maiden Voyage Cohesion TechsessieCFEngine Roadshow Maiden Voyage Cohesion Techsessie
CFEngine Roadshow Maiden Voyage Cohesion TechsessieMartin Simons
 
Drupal7 Development
Drupal7 DevelopmentDrupal7 Development
Drupal7 DevelopmentHans Rossel
 
Presentatie powershell
Presentatie powershellPresentatie powershell
Presentatie powershelldigistam
 
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)Avansa Mid- en Zuidwest
 
Jan Guldentops over Linux
Jan Guldentops over LinuxJan Guldentops over Linux
Jan Guldentops over Linux247 Invest
 
Nagios Open Source Monitoring
Nagios Open Source MonitoringNagios Open Source Monitoring
Nagios Open Source Monitoring247 Invest
 

Similar to Hands on presentatie (20)

Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15
 
Open Computer and Software Inventory
Open Computer and Software InventoryOpen Computer and Software Inventory
Open Computer and Software Inventory
 
Linux lessen gebruik (Maarten Blomme)
Linux lessen gebruik (Maarten Blomme)Linux lessen gebruik (Maarten Blomme)
Linux lessen gebruik (Maarten Blomme)
 
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & Vagrant
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & VagrantLinux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & Vagrant
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & Vagrant
 
Hosted Security Online Backup supporttraining
Hosted Security Online Backup supporttrainingHosted Security Online Backup supporttraining
Hosted Security Online Backup supporttraining
 
Infra as Code workshop
Infra as Code workshopInfra as Code workshop
Infra as Code workshop
 
Linux lessen intro (Maarten Blomme)
Linux lessen intro (Maarten Blomme)Linux lessen intro (Maarten Blomme)
Linux lessen intro (Maarten Blomme)
 
MediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa Installatie & Configuratie
MediaMosa Installatie & Configuratie
 
Vagrant + ansible vs docker
Vagrant + ansible vs dockerVagrant + ansible vs docker
Vagrant + ansible vs docker
 
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)
DigiPinguïns: van startknop naar desktop - UEFI, GRUB & systemd (Koen Wybo)
 
Bs 2 les 20110428
Bs 2   les 20110428Bs 2   les 20110428
Bs 2 les 20110428
 
Mijn site beveiliging
Mijn site beveiligingMijn site beveiliging
Mijn site beveiliging
 
Een presentatie over PFsense
Een presentatie over PFsenseEen presentatie over PFsense
Een presentatie over PFsense
 
CFEngine Roadshow Maiden Voyage Cohesion Techsessie
CFEngine Roadshow Maiden Voyage Cohesion TechsessieCFEngine Roadshow Maiden Voyage Cohesion Techsessie
CFEngine Roadshow Maiden Voyage Cohesion Techsessie
 
Drupal7 Development
Drupal7 DevelopmentDrupal7 Development
Drupal7 Development
 
Presentatie powershell
Presentatie powershellPresentatie powershell
Presentatie powershell
 
Linux
LinuxLinux
Linux
 
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)
DigiPinguïns: diagnose en herstel (Linux User Group Kortrijk)
 
Jan Guldentops over Linux
Jan Guldentops over LinuxJan Guldentops over Linux
Jan Guldentops over Linux
 
Nagios Open Source Monitoring
Nagios Open Source MonitoringNagios Open Source Monitoring
Nagios Open Source Monitoring
 

Hands on presentatie

  • 2. ● Inuits ● Open Source ● http://inuits.be ● Jan Vansteenkiste ● jan@inuits.be IntroductieIntroductie
  • 3. Virtual BoxVirtual Box ● Virtuele Machine ● KVM ● Xen ● VirtualBox ● ... ● Virtual Box ● Installatie – Windows: http://<my.ip>/ – Linux: Afhankelijk van distributie ● Ubuntu: sudo apt-get install virtualbox-ose
  • 4. Virtual BoxVirtual Box ● Aanmaken nieuwe Virtuele Machine ● Configureren nieuwe machine ● Installatie Linux
  • 5. Installatie LinuxInstallatie Linux ● Partitionering: Uitsplitsen? ● /var, /boot, /home, /tmp, ... ● Netwerk instellingen ● Root wachtwoord (in ubuntu: gebruiker aanmaken & wachtwoord instellen) ● Installatie basis systeem ● Installatie van packages ● Kernel (/boot) ● Bootloader ● Grub / Lilo
  • 6. Filesystem Hierarchy StandardFilesystem Hierarchy Standard ● Voorspellen locatie bestanden ● Software / OS ● Gebruikers ● Bestandsysteem ● Bestanden die kunnen gedeeld worden <-> Bestanden die NIET kunnen gedeeld worden ● Statisch <-> Variabel
  • 7. Filesystem Hierarchy StandardFilesystem Hierarchy Standard ● / - 'root' filesystem – start punt voor alles ● /bin - 'binary' – uitvoerbare bestandeen (voor gebruikers) ● /boot - bestanden noodzakelijk voor booten (opstarten) ● /dev - 'devices' – speciale directory (niet aanpassen) ● /etc - '' - systeem configuratie ● /home - peresoonlijke files ● /lib - gedeelde libraries ● /lost+found – filesystem controle ● /media - verwijderbare media (usb disk, cdroms) ● /mnt - permanente mounts ● /opt - optional – externe software (bv java, ...)
  • 8. Filesystem Hierarchy StandardFilesystem Hierarchy Standard ● /proc - kernel info / configuratie ● Voorbeeld: 'cat /proc/cpuinfo' ● /root - 'home' folder van root gebruiker ● /sbin - systeem binaries. Enkel beheerder heeft toegang ● /selinux- pseudo-filesysteem (zoals proc) voor selinux (security) ● /srv - plaats om bestanden aan te bieden door services ● /tmp - tijdelijke bestanden ● /usr - deelbare, -optionele) alleen-lezen data. Niet vereist om basis systeem werkend te krijgen. ● Verder onderverdeeld in: bin, lib, sbin, ... ● /var - 'variabel' – snel veranderende data ● /var/log - log bestanden ● /var/spool - nog te verwerken bestanden (mail bv) ● ...
  • 9. RunlevelsRunlevels ● Linux opstarten: ● bootloader -> kernel ● init (/etc/inittab) – runlevels ● Runlevel bepaalt welke services opgestart worden ● Speciale runlevels: ● 0: halt (shutdown) ● 6: reboot ● 1: single user ● 5: start grafische interface
  • 10. RunlevelsRunlevels ● /etc/init.d/ ● opstart scripts ● /etc/rc*.d/ ● runlevel configuratie ● symlinks (gebruik ls -l) ● Configuratie tools: ● rcconf ● service ● chkconfig (chkconfig -l -A)
  • 11. ShellShell ● Text based - Terminal ● Shell: Bash ● Prompt (username / hostname / directory) ● Build in commands: – echo, exit, export, history, kill, ... ● Ctrl-c : afbreken ● Ctrl-r : zoeken in history
  • 12. ShellShell ● Uitvoeren van commando's ● ls <opties> <argumenten> ls --help ls -la ● Bewegen door directory structuur ● Relatieve vs Absolute paden – '.' '..' – ~ – vb1: ../../folder vb2: /path/to/folder vb3: ~/folder/ ● Commandos: – pwd – cd – ls
  • 13. ShellShell ● Hulp op de shell: ● commando --help ● man <commando> q - afsluiten /zoekstr - zoeken – Zoek op wat '-o' doet bij het 'ls' commando
  • 14. ShellShell ● Bestand & Directory operaties ● mkdir - make dir ● touch - maakt lege bestanden aan ● cp - copy ● mv - move ● rm, rmdir - remove / removedir ● cat ● less, more cat bestand.txt | less ● find find . -iname *.log
  • 15. ● Maak een volgende structuur aan (mkdir, touch) <home-folder><home-folder> `-- handson`-- handson |-- nog_een_folder|-- nog_een_folder | `-- bestand1| `-- bestand1 `-- voorbeeld`-- voorbeeld `-- sub`-- sub |-- file1|-- file1 |-- file2|-- file2 `-- file3`-- file3● Kopieer bestand1 naar bestand2 in dezelfde map ● ls /dev | more ls /dev | less (ls afsluiten met 'q')
  • 16. Quick solutionQuick solution Sneller alternatief: mkdir -p handson/voorbeeld/sub mkdir handson/nog_een_folder Nog sneller: mkdir -p handson/{voorbeeld/sub,nog_een_folder} Bestanden aanmaken mbv (bash-)scripting for nr in `seq 1 3`; do touch handson/voorbeeld/sub/file$nr; done mkdir handson mkdir handson/voorbeeld mkdir handson/voorbeeld/sub mkdir handson/nog_een_folder touch handson/nog_een_folder/bestand1 touch handson/voorbeeld/sub/file1 touch handson/voorbeeld/sub/file2 touch handson/voorbeeld/sub/file3 cp handson/nog_een_folder/bestand1 handson/nog_een_folder/bestand2
  • 17. Text EditorsText Editors ● vi (vim = vi improved) ● commando's: – esc - verlaat huidige mode – i - insert mode – x - wis karakter – dd - wis lijn dw - wis woord – :q - afsluiten :q! - geforceerd afsluiten (niet opslaan) – :w - opslaan :wq - opslaan en afsluiten (idem :x) ● nano ● toetsenbord combinaties onderaan: ctrl-?
  • 18. Systeem commandosSysteem commandos ● ps ● kill ● top ● df ● du ● shutdown ● sudo (visudo!) su / su <user> sudo su <-> sudo su - ● which ● PATH variabele
  • 19. Users / Groups and PermissionsUsers / Groups and Permissions ● Gebruikers ● User IDs / Group IDs ● /etc/passwd, /etc/shadow ● /etc/group, /etc/gshadow ● useradd, usermod, userdel, id, 'who am i', w – id root ● Permissies op filesystem: ● ID, GID (numeriek) ● Bitmask
  • 20. PermissiesPermissies ● drwxr-xr-x 2 handson users 4096 Nov 4 08:07 folder ● r : read w : write x : execute (andere betekenis bij folders) ● <user><group><other> ● drwxr-xr-x - : normaal bestand d : directory l : symbolische link c : 'character' device (printer, tty) b : 'block' device (disk, cdrom)
  • 21. Number Binary Rights 0 000 ­­­ 1 001 ­­x 2 010 ­w­ 3 011 ­wx 4 100 r­­ 5 101 r­x 6 110 rw­ 7 111 rwx Permissies: OctaalPermissies: Octaal
  • 22. Permissies: AanpassenPermissies: Aanpassen ● chown - change owner chgrp - change group ● chmod - change file mode bits ● voorbeelden: ● chown handson bestand chgrp users bestand chown handson:users bestand chown :users bestand ● chmod 700 bestand chmod u=rwx,g-rwx,o-rwx bestand chmod a+w bestand
  • 23. Software InstallatieSoftware Installatie ● RPM / DEB ● Ubuntu ~ debian ● DPKG ● .deb pakketten – binary of source ● hoofd pakket management tool ● APT - Advanced Package Tool ● Frontend voor dpkg ● Automatisch downloaden / installeren pakketten ● Aptitude
  • 24. APTAPT ● /etc/apt/sources.list ● apt-get ● apt-get update ● apt-get upgrade ● apt-get install ● apt-get remove ● apt-cache ● apt-cache search
  • 25. APTAPT ● Zoek een alternatief om runlevel(s) te configureren ● Installeer een van deze programmas ● Gebruik het programma om de cron daemon te starten (cron voert commando's uit op geconfigureerde tijdstippen)
  • 26. NetworkingNetworking ● Configuratie ● Ubuntu maakt gebruik van 'NetworkManager' ● Manuele configuratie via 'ifconfig' – ifconfig -a - lijst alle interfaces ifconfig eth0 - toon configuratie van eth0 – ifconfig eth0 192.168.0.1/24 ● Automatische configuratie via dhcp – dhclient eth0 ● /etc/network/interfaces – Configuratie bij het opstarten
  • 27. Systeem configuratieSysteem configuratie ● /etc ● Algemene Systeem Configuratie: – Debian: /etc/default – Redhat: /etc/sysconfig – ... ● Pakketten – /etc/apache2/ – /etc/cron* ls /etc/cron* – ...
  • 28. Remote werken via SSHRemote werken via SSH ● Belang van Encryptie ● Onveilige protocollen: – telnet, ftp, http, pop3, imap – voorbeeld smtp login -> 'plain' password ● Veilige alternatieven: – ssh ftps, https, pop3s, imaps mbv ssl (Secure Socket Library) ● SSH ● ssh -l <user> <remote host> ● ssh-keys
  • 29. ssh-keygenssh-keygen ● Aanmaken van een key pair: ● private key ● public key ● ssh-keygen – ~/.ssh/id_rsa – ~/.ssh/id_rsa.pub ● Inhoud id_rsa.pub naar remote host toevoegen aan bestand: – ~/.ssh/authorized_keys