Samenvatting

  • /bin/bash = valid file location
  • 6.13.8. = stable kernel
  • $ = normal user
  • Relative path = ../nexus6
  • Command line is case insensitive

 

  • File permissions hoeven niet assigned before the apply
  • Alter file permissions = chmod
  • Change default permissions = umask
  • File permissions can be changed in: /etc/profile + $ Home/.bashrc + de CLI
  • Rm = delete
  • Cp = copy
  • Fl*ke = * = alles

 

  • % = job ID
  • Sigint = Ctrl C = stoppen
  • Ctrl Z = pauZeren
  • Signhup = logout
  • Sigkill cannot be caught
  • PS = snapshot alle processen die draaien
  • Top = welke zijn actief
  • Free = hoeveel RAM en SWAP
  • 0 = nice value normal users
  • -5 = root
  • -20 = highest
  • Renice = change a running process nice value –p =changing priority
  • Daemons = high priority

 

  • Nl script.pl > dicuss.txt = add numbers + sent
  • [1-49] = 1, 2, 3, 4, 9
  • * = the previous item any numbers of time
  • + = the previous item one or more
  • Append = >>
  • | = stout –stdin
  • $ command 2 > /dev/null = any data sent to /dev/null 2 = stderror
  • Vi = 2 modes
  • Tee = pakt output en stuurt dat naar 2 verschillende plekken

 

 

  • PS1 = command prompt
  • Script starts with #!
  • For or while loop = do and done
  • If requires a test, 0 or 1
  • Read allows user input in a bash script
  • Var = value = proper way to set a variable
  • # = comment in a script
  • Alias = simple command substitution
  • User specific = ~/.bash_profile
  • Global settings = /etc/profile
  • Variable = local and environment

 

  • BIOS = first step àhardware (clocktime)/separated form OS/what devices and in what order
  • BIOS reads the bootloader from the MBR (stage 1) , is 2e step
  • Stage 2 bootloader (LILO—must be informed after changes and GRUB)= load the kernel
  • Kernel = initializes hardware/loads initrd/create root device/start init
  • Init = starts all other processes that allow uses of the system à getty: allows users to login
  • DMESG = bootlog /var/log/messages
  • Runlevel 0 = shutdown
  • Runlevel 6 = reboot
  • 2=multiuser 3=network 4 userdefined 5=xmodus
  • Setting default runlevels = /etc/inittab
  • Telinit = change runlevel
  • /etc/init = which programs starts for the various runlevels
  • /etc/init.d = scripts for starting and stopping daemons
  • Installing Grub; grub-install /dev/had grub-mkconfig
  • /bin/bash = editing startmenu

 

  • Deleted files are recoverable until inodes are overwritten
  • Hardlinks can only be used on files
  • Softlink + directories and across filesystems
  • -rwxrwxrwx = hardlink d=directory L=softlink
  • Softlink remove = remove link file
  • Hardlink remove = delete the link
  • Fstab user = add user to mount system
  • Quota = how much disk?
  • Quotas are applicable to filesystems à require kernel under each file
  • Quotacheck + quotaon added to appropriate runlevels
  • Alter quotas = /etc/fstab
  • Fsck 1e step be root and 2e step is umount
  • Du = how much disk filled
  • Df = free?
  • Change configuration = tune
  • Dump = backup
  • PATA devices = hd*
  • SATA = dba/dbb
  • Partition = dba1

 

  • Fdisk provide a frontend for all the commands à making partition
  • Ext2 / ext3 = journaling
  • Insmod + modprobe = load a module
  • RAID can be treated as a partition for mounting à storage data on multiple disks into a LVM, prevent data loss
  • RAID created = mdadm
  • Lspci = see the hardware
  • /etc/fstab = partition listed
  • SWAP = 2x RAM, when system is out of Ram
  • Bootloader is located in Bootable
  • Logical volumes = analogue to partition
  • Partitions are stored in the MBR, max 4
  • Boot (static compiled) + Home can have its own partition
  • Superblocks: metadata

/etc       kernels, systemfiles, bootfiles

/dev      devices files

/etc       configuration files

/lib         libraries

/mnt     temporay mount

/opt       optional applications suites and environments

/proc     virtual file system

/root     home of root

/tmp     temporary file

/home  home of the user

/var

/usr       usr/home           /man                    helpfiles man format

/info                     helpfiles info format

/include               header files to build programs

/lib                         applic libraries

/bin                       application + non-essesentail   system binaries

/sbin                                     “              “

 

  • Apt = apt-get install package
  • Repositories are in /etc/apt/sources.list
  • Rpm = rpm –i package
  • Yum = yum install package
  • List of dependincies = ldd
  • Make = compile code

 

  • Emacspeak = for read difficulties
  • Sticky keys for toggling
  • Colorblind + high contrast
  • A display manager provide a way to begin X automatically to provide GUI logins
  • Window manager provides tools to manipulate windows
  • Display manager = xorg.conf file
  • Etc/inittab for starting display manager
  • Startx script for starting CLI
  • Add fonts: Package manager/obtain font files/add font server
  • Gnu font is not a valid font system

 

  • Unicode for various differend languages à moving data from one encoding to another
  • ASCII + UTF -8 for Unicode
  • Iconv = another type of conversion
  • LANG LC_* LC_ALL = whicj language
  • Locale is set by environmental variables; local –a = what locals are available
  • /etc/localtime
  • Tzselect = change timezone
  • Tzconfig = change settings
  • Hardware time = bios
  • Systemtime = date
  • NTPD = set at server time
  • Sntp = keep a system’s time automated and very precize
  • New user = adduser
  • At = command in the future at –f = file
  • Atq = managing at commands atrm = cancel commands
  • CRON = program that performs tasks at regular intervals, bv backups
  • Minute hour day month dayoftheweek
  • Date = system clock
  • NTP = clocks synchronized
  • allow + at.deny = neither
  • Usermod = alter various aspects
  • Chage = change password every so often
  • /etc/shadow
  • Username;password;user id;group id;comments about user;userhome
  • Disable account = lock an account

 

  • /var/log = logfiles stored
  • Config logging system = editing syslog.conf
  • Logger = generate log entries manually
  • Logrotation = older messages are archieved
  • SMTP = sent mail push
  • Pop 3 and IMAP = pulling
  • MTA = mail transfer agent, way to acces and sent mail
  • /var/spool = local email stored
  • ~/.forward with forwarding adres to forward mail
  • 631 = portmail CUPS (common unix printing system)
  • Printer definitions + /etc/cups/ppd
  • Lprm = remove printjobs
  • Queue = mail waiting
  • Lpq = display the queue
  • Lpc = rearranging or suspending jobs

 

  • Ports daemons altered = /etc/services
  • Ifconfig = list and alter NIC’s
  • DHCP = allow network setup configuration automatically à or manually
  • Port 80 = http 443= https 22=sshd
  • conf = add rules firewall
  • Iface eth0 inet static = first line in /etc/network/interface file
  • Ports = allow data to be sent to programs on a machine
  • Ping = illicit a respons from another system on a network
  • Traceroute = find bottleneck, show each machine a packet passes through
  • Dig = more ip information
  • DNS /etc/resolv.conf àconf
  • Host + nslookup = find ip adres
  • Routers = traffic form NIC to another à iptables
  • NAT = name adres translation = setup each nic-enable ip forwarding-setup rules
  • Iptables –t NAT –a prerouting –p tcp ppp0 –dport 80 –j DNAT –to 192.168.10.12
  • Firewalls = drops packets instead of forwarding them
  • Iptables –A input –I eth0 –p all –s 81.92.157.210 –j DROP
  • Troubleshooting: ping (localhost/LAN/wider) / hardware / DHCP

 

  • Tunnelling = across SSH
  • Gpg encrypting = gpg –encrypt
  • Find open ports = netstat + lsof + nmap
  • Superserver + added layer between netword connections = programs
  • TCP wrapper = allow or deny connections based on client information
  • SUID = permission to run as different user then the one who started the process
  • Chage = change password periodically
  • Edit /etc/security/limits.conf
  • Wheel = rootgroup
  • Sudoers = rootfile
  • Inititab = remove unwanted servers
  • PAM = pluggable authentication modules
  • Forkbomb = restricted in the number of processes-killall
  • Encryption = public and private key

 

  • com/blog/entry2415.html
  • conf = change settings
  • Programming languages apache = required apache modules
  • “C” associated with kernel
  • Python = whitespace
  • Update = to alter data
  • Insert = create new data
  • Delete = remove data
  • Select = return data
  • SQL = structure query language, communicatie with relational databases
  • LAMP = requires server (as a daemon) – finding a way to get data in and out of a database – using CLI or GUI
  • Start mysql server – set it appropriate runlevel – create user
  • CREATE DATABASE – USE – CREATE TABLE
  • INSERT = add rows
  • UPDATE = edit data
  • DELETE = remove
  • SELECT = output values
  • * display all colums
  • WHERE = defines the rows
  • Languages: Perl – Python – C (gcc = gnu C compiler) – C++ – PHP