CCNA Notes
CompTIA LX103
Cisco ICND1
Cisco ICND2
- Topics
- To
- Be
- Added
Cisco CCNP Route
Various
Labs
CompTIA LX103
Cisco ICND1
Cisco ICND2
Cisco CCNP Route
Various
Labs
Files preceeded by a . are hidden/config files and won't show unless -a flag is used in ls cmd.
ls readout: perms, ?, user, group, file, last touched, name.
first perm bit 'd' means it's a dir.
A dot will match any single char except newlines: a.z will match abz aQz a9Z and etc.
A regex may be followed by a special symbol to denote how many times a matching item must exist.
Vertical Bar (|) separates two possible matches:
Surrounds subexpressions (no example in chapter 1)
If you want to match special chars like a dot (.) you must escape it with a backslask: \. (Not unlike bash and python)
Searches for patterns: grep [options] regexp [files]
flags:
sed 's/2012/2013/' file.txt > new.txt # Change first occurrence of 2012 to 2013 and redirect output to new.txt
Can change default permissions with umask.
numeric or symbolic modes.
: or . works as seperator
Scheduled task system. Stateless, doesn't remember previous jobs.
Sample Syntax:
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed */2 1 1,15 * * root echo "Hello world!" > /tmp/hello.txt # 1st and 15th day of month # /2 = every 2 # 1,15 = 1st and 15th # 1-5 = 1st through 5th
Otherwise, symlinking scripts/programs to cron.daily,monthly, weekly, hourly, etc folders will work.
crontab -e to edit user cron, independent from system cron.
uses apt-get / dpkg
Config file located in /etc/apt. sources.list important. sources.list.d folder contains official repos.
top stuff.
Code/functions compiled into files called libraries that other programs/code can call on, reducing code and disk space by not having 50 variations of code that do the same thing.
Enumerates hardware before OS is loaded. Drivers will determine how hardware acts in Linux OS. May need to drownload drivers from manufacturers for optimal performance.
drivers loaded in /sys/bus/pci/drivers.
If problems present, check bios. Check drivers! Check lsmod, lspci, lsusb. use modprobe to load modules. Check with the vendor.
Not on exam, but steps demo underlying system that are on exam.
serial --unit 1 --speed=9600 terminal --timeout 300 console serial
Logicall manages volumes/partitions, create and resize across multiple disks.
Mounts devs on boot.
device mount FS Options - Dump - Pass(fschk) /dev/sda1 / ext4 defaults 0|1 0|1|2 device = device mount = mount location FS = filesystem to expect Options = boot options (defaults is a combo of options). Like, rw, ro, sync, async, etc. Dump = old unix backup system. If dump not installed or used, it means nothing. 0 no bkup, 1 = bkup. Pass = FSCHK, 0 no check, 1 check (high pri), 2 check (2ndary pri)
An alternative init system – (usual is upstart, sysV) Breaks up config files.
Is a program, running all the time. SysV = script, one line/procedural at a time. hangup on one line can cause delays. SystemD, one hung up module won't block all others.
SystemD on boot looks for UNITS and TARGETS.
Both used to search for files. locate uses a database of information to search and is updated via a syscron or manual updatedb. find will search the disk in specified locations for files and objects.