├── Application ├── architecture │ └── index.json ├── cache │ └── index.json ├── gateway │ ├── index.json │ └── intro.md ├── ipc │ └── index.json ├── monitoring │ └── index.json ├── search │ └── index.json ├── security │ └── index.json ├── storage │ └── index.json └── structure.json ├── DevOps ├── build │ └── index.json ├── deploy │ ├── index.json │ └── intro.md ├── monitor │ ├── index.json │ └── intro.md ├── plan │ ├── api.md │ ├── documentation.md │ ├── index.json │ ├── management_tools.md │ ├── messengers.md │ ├── methodologies.md │ ├── scripts │ │ ├── check.sh │ │ └── foreground.sh │ ├── service │ │ ├── finish.md │ │ └── intro.md │ └── uml.md ├── structure.json └── test │ └── index.json ├── Frontend └── structure.json ├── LICENSE.txt ├── Linux ├── 7-helps │ ├── ip_syntax.txt.html │ ├── linux-popular-utils-helps.txt │ ├── linux-proc-sys-contents.txt │ ├── linux_shell_cheat.txt │ ├── linux_tmux_monitor.png │ ├── vim_cheat.txt │ ├── voip-monitoring.txt │ └── voip │ │ ├── asterisk_src_analysis.txt │ │ ├── kamailio.txt │ │ └── sipp.txt ├── bash │ ├── arrays.md │ ├── builtins.md │ ├── conditions.md │ ├── functions.md │ ├── index.json │ ├── jobs.md │ ├── loops.md │ ├── redirections.md │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ ├── service │ │ ├── finish.md │ │ └── intro.md │ └── vars_subst.md ├── common │ ├── coreutils.md │ ├── explore_fs.md │ ├── find.md │ ├── grep_sed.md │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ ├── service │ │ ├── finish.md │ │ └── intro.md │ ├── tar.md │ └── vim.md ├── localhost │ ├── app_management.md │ ├── cron.md │ ├── grub.md │ ├── index.json │ ├── logging.md │ ├── monitoring.md │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ ├── security.md │ ├── service │ │ ├── finish.md │ │ └── intro.md │ ├── sudo.md │ ├── systemd.md │ ├── tmux.md │ └── users.md ├── networking │ ├── activity.md │ ├── dynamic_route.md │ ├── index.json │ ├── ip_ethtool.md │ ├── netfilter.md │ ├── netplan.md │ ├── networkd.md │ ├── qos.md │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ ├── service │ │ ├── finish.md │ │ └── intro.md │ └── traffic.md ├── services │ ├── dhcp_ntp_tftp.md │ ├── dns.md │ ├── index.json │ ├── ldap_kerberos.md │ ├── nfs_samba.md │ ├── postgresql_mariadb.md │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ ├── service │ │ ├── finish.md │ │ └── intro.md │ ├── ssh_vpn.md │ ├── voip.md │ └── web_lb.md ├── storage │ ├── filesystems.md │ ├── fileutils.md │ ├── index.json │ ├── lvm.md │ ├── raid.md │ ├── san.md │ ├── scripts │ │ ├── background.sh │ │ ├── check.sh │ │ └── foreground.sh │ └── service │ │ ├── finish.md │ │ └── intro.md └── structure.json ├── Performance ├── CPU │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── Disks │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── FS │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── Memory │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── Network │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── OS_theory │ ├── 1_boot.md │ ├── 2_alter_bios.md │ ├── 3_kernel_subsystems.md │ ├── 4_scheduler.md │ ├── 5_storage_subsystem.md │ ├── 6_network_subsystem.md │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── Observability_Tools │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md ├── SAR_perf_Ftrace │ ├── index.json │ ├── scripts │ │ ├── background.sh │ │ └── check.sh │ └── service │ │ ├── finish.md │ │ └── intro.md └── structure.json └── README.md /Application/architecture/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/cache/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/gateway/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/gateway/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to API Gateway scenario! 2 | 3 | Read some useful articles before: 4 | - [microservices.io - API Gateway](https://microservices.io/patterns/apigateway.html) 5 | - [ibm.com - What Are API Gateways?](https://www.ibm.com/blog/api-gateway/) 6 | - [geekflare.com - API Gateway](https://geekflare.com/api-gateway/) 7 | - [cncf.io - API Gateways](https://landscape.cncf.io/card-mode?category=api-gateway&grouping=category) 8 | 9 | And watch some videos: 10 | - [youtube.com - What is API Gateway? ByteByteGo](https://www.youtube.com/watch?v=6ULyxuHKxg8) 11 | - [youtube.com - What is an API Gateway? IBM](https://www.youtube.com/watch?v=hWRRdICvMNs) 12 | - [youtube.com - What is an API Gateway? Defog Tech](https://www.youtube.com/watch?v=vHQqQBYJtLI) 13 | - [youtube.com - API Gateway explained](https://www.youtube.com/watch?v=8WuVBbXsHzg) 14 | 15 | Now, lets start! 16 | -------------------------------------------------------------------------------- /Application/ipc/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/monitoring/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/search/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/security/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/storage/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "title", 3 | "description": "description", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Application/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "4 - Backend", 3 | "description" : "High loaded and scalable backend", 4 | "items": [ 5 | { 6 | "path": "architecture", 7 | "title": "1 - Architecture", 8 | "description" : "Architecture of scalable applications." 9 | },{ 10 | "path": "gateway", 11 | "title": "2 - API gateway", 12 | "description" : "API gateway - entry point." 13 | },{ 14 | "path": "security", 15 | "title": "3 - Security", 16 | "description" : "Authentication, authorization and security." 17 | },{ 18 | "path": "ipc", 19 | "title": "4 - IPC", 20 | "description" : "Interprocess communication." 21 | },{ 22 | "path": "storage", 23 | "title": "5 - Storage", 24 | "description" : "Storage and databases." 25 | },{ 26 | "path": "cache", 27 | "title": "6 - Cache", 28 | "description" : "Caching subsystem." 29 | },{ 30 | "path": "search", 31 | "title": "7 - Search", 32 | "description" : "Fulltext search and indexing." 33 | },{ 34 | "path": "monitoring", 35 | "title": "8 - Monitoring", 36 | "description" : "Monitoring and service-mesh." 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /DevOps/build/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "CI/CD practice", 3 | "description": "This is the description of DCIP", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /DevOps/deploy/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Links to other interesting cources", 3 | "details": { 4 | "intro": { 5 | "text": "intro.md" 6 | } 7 | }, 8 | "backend": { 9 | "imageid": "ubuntu" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DevOps/deploy/intro.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/monitor/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "CI/CD practice", 3 | "description": "This is the description of DCIP", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /DevOps/monitor/intro.md: -------------------------------------------------------------------------------- 1 | { 2 | "title": "CI/CD practice", 3 | "description": "This is the description of DCIP", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /DevOps/plan/api.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/documentation.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "1 - Plan", 3 | "description": "The Plan phase of DevOps pipeline", 4 | "details": { 5 | "intro": { 6 | "foreground": "scripts/foreground.sh", 7 | "text": "service/intro.md" 8 | }, 9 | "steps": [ 10 | { 11 | "title": "1/5 Development methodologies [00:00]", 12 | "text": "methodologies.md", 13 | "verify": "scripts/check.sh" 14 | },{ 15 | "title": "2/5 Development process Management tools [00:00]", 16 | "text": "management_tools.md", 17 | "verify": "scripts/check.sh" 18 | },{ 19 | "title": "3/5 Messengers [00:00]", 20 | "text": "messengers.md", 21 | "verify": "scripts/check.sh" 22 | },{ 23 | "title": "4/5 Documentation [00:00]", 24 | "text": "documentation.md", 25 | "verify": "scripts/check.sh" 26 | },{ 27 | "title": "5/5 UML [00:00]", 28 | "text": "uml.md", 29 | "verify": "scripts/check.sh" 30 | } 31 | ], 32 | "finish": { 33 | "text": "service/finish.md" 34 | } 35 | }, 36 | "backend": { 37 | "imageid": "ubuntu" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /DevOps/plan/management_tools.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | Management tools: 4 | - [taiga.io - Free and open-source project management tool](https://taiga.io/) 5 | - [github.com - Taiga Source code](https://github.com/kaleidos-ventures/taiga-back) 6 | - [openproject.org - Web-based project management software](https://www.openproject.org/community-edition/) 7 | - [redmine.org - Flexible project management web application](https://www.redmine.org/) 8 | - [github.com - Mattermost. Secure collaboration across the entire development lifecycle](https://github.com/mattermost/mattermost) 9 | 10 | Interesting video tutorials: 11 | - [youtube.com - Top 5 Best Free Project Management Software](https://www.youtube.com/watch?v=9FBa0mO2tyk) 12 | - [youtube.com - The 10 Best FREE Project Management Tools For 2023](https://www.youtube.com/watch?v=gNmlAIw94ew) 13 | 14 | Task list: 15 | - Read ALL documentation on the links above and watch videos 16 | - Choose one of the Project management tools? install it, and try 17 | 18 |
If You have read all and understood 19 |
20 | `touch IReadAllAndUndnderstood`{{exec}}
21 | 
22 | -------------------------------------------------------------------------------- /DevOps/plan/messengers.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/methodologies.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [wikipedia.org - Software_development_process](https://en.wikipedia.org/wiki/Software_development_process) 4 | - [tatvasoft.com - TOP 12 Software Development methodologies](https://www.tatvasoft.com/blog/top-12-software-development-methodologies-and-its-advantages-disadvantages/) 5 | - [tutorialspoint.com - SDLC Tutorial](https://www.tutorialspoint.com/sdlc/index.htm) 6 | 7 | Agile methodology: 8 | - [atlassian.com - What is the Agile methodology?](https://www.atlassian.com/agile) 9 | - [redhat.com - Understanding DevOps](https://www.redhat.com/en/topics/devops) 10 | - [redhat.com - What is SRE (site reliability engineering)?](https://www.redhat.com/en/topics/devops/what-is-sre) 11 | - [atlassian.com - What is scrum?](https://www.atlassian.com/agile/scrum) 12 | - [atlassian.com - What is kanban?](https://www.atlassian.com/agile/kanban) 13 | - [scrumguides.org - The 2020 Scrum Guide](https://scrumguides.org/scrum-guide.html) 14 | 15 | Waterfall methodology: 16 | - [geeksforgeeks.org - Classical waterfall model](https://www.geeksforgeeks.org/software-engineering-classical-waterfall-model/) 17 | - [tutorialspoint.com - Waterfall model](https://www.tutorialspoint.com/sdlc/sdlc_waterfall_model.htm) 18 | 19 | DevOps : 20 | - [wikipedia.org - DevOps](https://en.wikipedia.org/wiki/DevOps) 21 | - [techtarget.com - What is DevOps? The ultimate guide](https://www.techtarget.com/searchitoperations/definition/DevOps) 22 | 23 | Interesting video tutorials: 24 | - [youtube.com - Choosing a Model](https://www.youtube.com/watch?v=F5fuUs7oJu0) 25 | - [youtube.com - Introduction To Software Development LifeCycle](https://www.youtube.com/watch?v=Fi3_BjVzpqk) 26 | - [youtube.com - What is Agile?](https://www.youtube.com/watch?v=WjwEh15M5Rw) 27 | - [youtube.com - What is DevOps?](https://www.youtube.com/watch?v=0yWAtQ6wYNM) 28 | - [youtube.com - What is SRE?](https://www.youtube.com/watch?v=OnK4IKgLl24) 29 | 30 | Task list: 31 | - Read ALL documentation on the links above and watch videos 32 | - Explain what is Agile 33 | - Explain what is DevOps 34 | - Explain what is SRE 35 | 36 |
If You have read all and understood 37 |
38 | `touch IReadAllAndUndnderstood`{{exec}}
39 | 
40 | -------------------------------------------------------------------------------- /DevOps/plan/scripts/check.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/service/finish.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/plan/service/intro.md: -------------------------------------------------------------------------------- 1 | https://digital.ai/learn/devops-periodic-table/ 2 | -------------------------------------------------------------------------------- /DevOps/plan/uml.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevOps/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "3 - DevOps/SRE", 3 | "description" : "Learn how to use DevOps/SRE tools at practice", 4 | "items": [ 5 | { 6 | "path": "plan", 7 | "title": "1 - Plan", 8 | "description" : "The Plan phase of DevOps pipeline. Is where the enhancements, changes, bug fixes, or new features are set up." 9 | },{ 10 | "path": "build", 11 | "title": "2 - Build", 12 | "description" : "The Build phase of DevOps pipeline." 13 | },{ 14 | "path": "test", 15 | "title": "3 - Test", 16 | "description" : "Testing and bug fixing utilities." 17 | },{ 18 | "path": "deploy", 19 | "title": "4 - Deploy", 20 | "description" : "Most common deployment practices." 21 | },{ 22 | "path": "monitor", 23 | "title": "5 - Monitor", 24 | "description" : "Popular monitoring tools." 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /DevOps/test/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "GIT practice", 3 | "description": "This is the description of DGP", 4 | 5 | "backend": { 6 | "imageid": "ubuntu" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Frontend/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "5 - Frontend", 3 | "description" : "Learn, how to develop frontend application", 4 | "items": [ 5 | { 6 | "path": "FO theory", 7 | "title": "Frontend theory", 8 | "description": "Frontend development theory" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Public domain. -------------------------------------------------------------------------------- /Linux/7-helps/linux-proc-sys-contents.txt: -------------------------------------------------------------------------------- 1 | ====/proc==== 2 | 1/ 3 | 9/ 4 | acpi/ 5 | bus/ 6 | driver/ 7 | dynamic_debug/ 8 | fs/ 9 | irq/ 10 | net@ 11 | pressure/ 12 | scsi/ 13 | self@ 14 | sys/ 15 | sysvipc/ 16 | thread-self@ 17 | tty/ 18 | bootconfig 19 | buddyinfo 20 | cgroups 21 | cmdline 22 | consoles 23 | cpuinfo 24 | crypto 25 | devices 26 | diskstats 27 | dma 28 | execdomains 29 | fb 30 | filesystems 31 | interrupts 32 | iomem 33 | ioports 34 | kallsyms 35 | kcore 36 | key-users 37 | keys 38 | kmsg 39 | kpagecgroup 40 | kpagecount 41 | kpageflags 42 | latency_stats 43 | loadavg 44 | locks 45 | mdstat 46 | meminfo 47 | misc 48 | modules 49 | mounts@ 50 | mtrr 51 | pagetypeinfo 52 | partitions 53 | schedstat 54 | slabinfo 55 | softirqs 56 | stat 57 | swaps 58 | sysrq-trigger 59 | timer_list 60 | uptime 61 | version 62 | version_signature 63 | vmallocinfo 64 | vmstat 65 | zoneinfo 66 | ====/proc/9==== 67 | attr/ apparmor current exec fscreate keycreate prev smack sockcreate 68 | cwd@ 69 | fd/ 0 1 2 3 4 5 6 7 8 9 70 | fdinfo/ 0 1 2 3 4 5 6 7 8 9 71 | map_files/ 563ed3610000-563ed3626000 7860a467b000-7860a4680000 7860a47bb000-7860a47f6000 7860a4afd000-7860a4afe000 72 | net/ anycast6 dev_mcast icmp igmp6 ip_mr_cache ip_tables_targets netfilter protocols raw6 rt_cache sockstat6 tcp6 udplite6 xfrm_stat 73 | arp dev_snmp6 icmp6 ip6_flowlabel ip_mr_vif ipv6_route netlink psched route snmp softnet_stat udp unix 74 | connector fib_trie if_inet6 ip6_mr_cache ip_tables_matches mcfilter netstat ptype rt6_stats snmp6 stat udp6 vlan 75 | dev fib_triestat igmp ip6_mr_vif ip_tables_names mcfilter6 packet raw rt_acct sockstat tcp udplite wireless 76 | ns/ cgroup ipc mnt net pid pid_for_children time time_for_children user uts 77 | root@ 78 | task/ 9 79 | arch_status 80 | autogroup 81 | auxv 82 | cgroup 83 | clear_refs 84 | cmdline 85 | comm 86 | coredump_filter 87 | cpu_resctrl_groups 88 | cpuset 89 | environ 90 | exe@ 91 | gid_map 92 | io 93 | ksm_merging_pages 94 | ksm_stat 95 | latency 96 | limits 97 | loginuid 98 | maps 99 | mem 100 | mountinfo 101 | mounts 102 | mountstats 103 | numa_maps 104 | oom_adj 105 | oom_score 106 | oom_score_adj 107 | pagemap 108 | patch_state 109 | personality 110 | projid_map 111 | sched 112 | schedstat 113 | sessionid 114 | setgroups 115 | smaps 116 | smaps_rollup 117 | stack 118 | stat 119 | statm 120 | status 121 | syscall 122 | timens_offsets 123 | timers 124 | timerslack_ns 125 | uid_map 126 | wchan 127 | ====/sys==== 128 | block/ loop0 loop1 loop2 loop3 loop4 loop5 loop6 loop7 vda 129 | bus/ acpi/ clocksource/ dax/ event_source/ isa/ memory/ mmc/ nvmem/ pci_express/ rapidio/ serial/ soc/ virtio/ xen/ 130 | auxiliary/ container/ edac/ gpio/ machinecheck/ memory_tiering/ nd/ pci/ platform/ scsi/ serial-base/ spi/ vme/ xen-backend/ 131 | clockevents/ cpu/ eisa/ i2c/ mdio_bus/ mipi-dsi/ node/ pci-epf/ pnp/ sdio/ serio/ usb/ workqueue/ 132 | class/ accel/ bdi/ devfreq-event/ drm/ hwmon/ iommu/ mmc_host/ pci_epc/ pps/ remoteproc/ scsi_generic/ tpm/ vc/ 133 | ata_device/ block/ devlink/ extcon/ i2c-adapter/ leds/ msr/ phy/ ptp/ rfkill/ scsi_host/ tpmrm/ virtio-ports/ 134 | ata_link/ bsg/ dma/ firmware/ i2c-dev/ mdio_bus/ nd/ power_supply/ pwm/ rtc/ spi_master/ tty/ vtconsole/ 135 | ata_port/ devcoredump/ dma_heap/ gpio/ input/ mem/ net/ powercap/ rapidio_port/ scsi_device/ spi_slave/ usb_role/ wakeup/ 136 | backlight/ devfreq/ dmi/ graphics/ intel_scu_ipc/ misc/ pci_bus/ ppp/ regulator/ scsi_disk/ thermal/ usbmisc/ watchdog/ 137 | dev/ block/ char/ 138 | devices/ LNXSYSTM:00/ breakpoint/ isa/ kprobe/ msr/ pci0000:00/ platform/ pnp0/ software/ system/ tracepoint/ uprobe/ virtual/ 139 | firmware/ acpi/ dmi/ memmap/ 140 | fs/ bpf/ btrfs/ cgroup/ ecryptfs/ ext4/ fuse/ pstore/ 141 | hypervisor/ 142 | kernel/ boot_params/ config/ irq/ reboot/ software_nodes/ cpu_byteorder kexec_crash_loaded notes rcu_expedited uevent_seqnum 143 | btf/ debug/ livepatch/ security/ tracing/ crash_elfcorehdr_size kexec_crash_size oops_count rcu_normal vmcoreinfo 144 | cgroup/ iommu_groups/ mm/ slab/ address_bits fscaps kexec_loaded profiling uevent_helper warn_count 145 | module/ 8021q/ br_netfilter/ drm_kms_helper/ joydev/ nf_conntrack_netlink/ processor/ spurious/ virtio_scsi/ 146 | 8250/ bridge/ dynamic_debug/ kdb/ nf_defrag_ipv4/ psmouse/ sr_mod/ virtual_root/ 147 | acpi/ btrfs/ edac_core/ kernel/ nf_defrag_ipv6/ pstore/ srcutree/ vt/ 148 | acpi_cpufreq/ button/ edd/ keyboard/ nf_nat/ raid0/ stp/ watchdog/ 149 | acpiphp/ clocksource/ efi_pstore/ kfence/ nf_tables/ raid1/ suspend/ workqueue/ 150 | aesni_intel/ configfs/ ehci_hcd/ kgdb_nmi/ nfnetlink/ raid10/ sysrq/ x_tables/ 151 | ahci/ cpufreq/ eisa_bus/ kgdboc/ nft_chain_nat/ raid456/ tcp_cubic/ xen/ 152 | apparmor/ cpuidle/ fb/ libahci/ nft_compat/ raid6_pq/ thermal/ xen_acpi_processor/ 153 | async_memcpy/ crc32_pclmul/ firmware_class/ libata/ nls_iso8859_1/ random/ tpm/ xen_blkfront/ 154 | async_pq/ crc64_rocksoft/ fscrypto/ libcrc32c/ nmi_backtrace/ rcupdate/ tpm_crb/ xen_netfront/ 155 | async_raid6_recov/ crc_t10dif/ fuse/ libnvdimm/ overlay/ rcutree/ tpm_tis/ xfrm_algo/ 156 | async_tx/ crct10dif_pclmul/ garp/ llc/ page_alloc/ rfkill/ tpm_tis_core/ xfrm_user/ 157 | async_xor/ cryptd/ ghash_clmulni_intel/ loop/ page_reporting/ rng_core/ udmabuf/ xhci_hcd/ 158 | ata_generic/ crypto_simd/ gpiolib_acpi/ md_mod/ pata_sis/ rtc_cmos/ uhci_hcd/ xor/ 159 | ata_piix/ cryptomgr/ grant_table/ memory_hotplug/ pcc_cpufreq/ sch_fq_codel/ usbcore/ xt_MASQUERADE/ 160 | utofs4/ debug_core/ haltpoll/ microcode/ pci_hotplug/ scsi_mod/ uv_nmi/ xt_addrtype/ 161 | battery/ device_hmem/ i8042/ module/ pcie_aspm/ secretmem/ virtio_blk/ xt_conntrack/ 162 | binfmt_misc/ dm_mod/ ima/ mousedev/ pciehp/ serio_raw/ virtio_mmio/ xz_dec/ 163 | blake2b_generic/ dm_multipath/ input_leds/ mrp/ polyval_clmulni/ sg/ virtio_net/ zswap/ 164 | blk_cgroup/ dmi_sysfs/ intel_idle/ msr/ polyval_generic/ sha1_ssse3/ virtio_pci/ compression 165 | blk_crypto/ dns_resolver/ ip_tables/ netpoll/ ppp_generic/ sha256_ssse3/ virtio_pci_legacy_dev/ 166 | block/ drm/ ipv6/ nf_conntrack/ printk/ shpchp/ virtio_pci_modern_dev/ 167 | power/ suspend_stats/ image_size pm_async pm_freeze_timeout pm_test pm_trace_dev_match reserved_size resume_offset sync_on_suspend wake_unlock 168 | disk mem_sleep pm_debug_messages pm_print_times pm_trace pm_wakeup_irq resume state wake_lock wakeup_count -------------------------------------------------------------------------------- /Linux/7-helps/linux_shell_cheat.txt: -------------------------------------------------------------------------------- 1 | # My TOP Hot-keys 2 | Ctrl+LEFT - Ctrl+RIGHT # Goto beginig/end of current word under cursor 3 | Ctrl+A - Ctrl+E # Goto start or end of current line 4 | Alt+Backspace # Delete current word 5 | Ctrl+Shift+_ # Undo last mistake edit (or deletion) 6 | Alt+D # Delete word after cursor 7 | Ctrl+Shift+R # Open interactive history 8 | 9 | ls -AlF # Opposite to $ ls -la 10 | # variants: 11 | # (-AlFR | less) - recursive 12 | # (-AlFS) - sort by size, (-AlFtr) - sort by time in reverce order 13 | cd - # Go to previously visited catalog 14 | 15 | ps fax # Opposite to $ ps aux 16 | 17 | # Explore /proc pseudofs 18 | find /proc -maxdepth 1 -type f -not -regex '.*/[0-9]*' 19 | find /proc -not -regex '.*kmsg\|.*kcore\|.*kallsyms\|.*kpage.*' -maxdepth 1 -type f -exec echo {} ---=== NEXT ===------------ \; -exec cat {} \; | less 20 | find /proc -maxdepth 1 -type d -not -regex '.*/[0-9]*' 21 | 22 | # Explore /sys pseudofs 23 | ls /sys 24 | find /sys/ -maxdepth 2 | less 25 | 26 | # Explore storage 27 | lsblk -fm 28 | df -Th # Opposite to $ df -h 29 | pvs;vgs;lvs 30 | du -sh ./* | sort -h # Show sizes of all contents in directory 31 | iostat -cNx 3 # Show FS and CPU load every 3 second 32 | 33 | # Initial network diagnostic 34 | ip -br ad 35 | watch "ip -s link" 36 | watch -n 1.5 ip -s link show enp1s0 # Watch interface stats every 1.5 sec 37 | ethtool enp0s1 38 | 39 | ss -s # Brief states 40 | # ss -tulpan # Means Socket State -TCP -UDP -LISTEN_only -ProcID -a_LISTEN+ESTAB -numeric # !!! IT EXCLUDES nl,u_seq,u_dgr,u_str,*v6 PROTO !!! 41 | ss -pan # is the same as $ ss -tulpan EVEN BETTER !!! 42 | watch lsof -i # List open sockets every 2 second 43 | lsof -i4 # Opposite to $ ss -tulpan, show IPv4 sockets 44 | lsof -i TCP:22-1024 # Who is on the range from 22 to 1024 TCP port 45 | lsof +D /var/log # Print all open files in /var/log 46 | lsof -u nginx # List open files of nginx user 47 | lsof -u ^[user1] # List open files except opened by user1 48 | lsof -c nginx # List open files of nginx process 49 | 50 | # Explore system daemons and startup 51 | systemctl 52 | 53 | # Explore system logs 54 | journalctl 55 | tail -f /var/log/some.log 56 | 57 | # Change MC editor 58 | select-editor 59 | 60 | # Create subdirectory in all directories of /catalog 61 | find /catalog/ -mindepth 1 -maxdepth 1 -type d -exec mkdir -p {}/.sub \; 62 | 63 | # Copy files with absolute path. Useful for chroot and containers 64 | tar -c -h /path/to/file1 /path/to/file2 | tar -x -C newroot/ 65 | 66 | # Create empty wav 67 | sudo apt-get install libsox-fmt-all # On CentOS you must recompile SoX to get .mp3 68 | sox -n -r 44100 -c 1 empty.wav trim 0 0 # One channel empty WAV 69 | soxi empty.wav 70 | sox -M empty.wav empty.wav empty.mp3 # Merge into MP3 71 | 72 | diff -u <(man 1 intro | col) <(man 2 intro | cat) | less 73 | cut -d\| -f1 # Opposite to $ awk -F \| '{print $1}' 74 | 75 | # Install single package 76 | rpm -i *.rpm # Or yum install *.rpm -y 77 | # Find indtalled packages 78 | rpm -qa | grep somepack* 79 | # List rpm contents 80 | rpm -qlp package.rpm 81 | dpkg -L installed-package 82 | # Unpack rpm package 83 | rpm2cpio *.rpm | cpio -idmv 84 | -------------------------------------------------------------------------------- /Linux/7-helps/linux_tmux_monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevOps-learninig-org/killerkoda-DevOps-practice/fbceb6eb9137b0eecef705b1754a843fdda3bbd2/Linux/7-helps/linux_tmux_monitor.png -------------------------------------------------------------------------------- /Linux/7-helps/vim_cheat.txt: -------------------------------------------------------------------------------- 1 | echo -e "set nu\nsyntax off\nset expandtab\nset shiftwidth=2" | sudo -u user tee ~user/.vimrc ~user/.virc ### change ~user 2 | 3 | echo grep less vi ls cat sed awk tr lvm lsblk file cp mv 4 | 5 | ~ ### Changes the case of current character 6 | guu ### Change current line from upper to lower. 7 | gU7U ### Change 7 lines from current to UPPER. 8 | guw ### Change to end of current WORD from upper to lower. 9 | guaw ### Change all of current WORD to lower. 10 | gUw ### Change to end of current WORD from lower to upper. 11 | 12 | 5GgU10G ### GoTo 5 line and change to UPPER whole lines until 10 13 | : 5,7 norm gUU ### Change to UPPER case in range from 5 to 7 line 14 | 15 | (^a) ### Increment selected digit 16 | 7(^a) ### Add 7 to selected digit 17 | (^x) ### Decrement selected digit 18 | : echo 21 - 7 ### Echo result of expression 19 | 20 | : 6,9 s/\s\+$// ### Trim spaces to end of lines range 21 | : 6,9 s/\s\+\S\+$// ### Delete latest word and trim spaces of lines range 22 | : 6,9 s/\(\S\+\)$/&\t\1/ ### Copy each latest word of range 23 | to the end of its own string after \tab 24 | 25 | (^v)e 3w 3j d ### Goto VISUAL, select 3 words, 26 | select the same words onto 3 lines after 27 | and delete them 28 | 29 | : 6,9 s/words words//g 30 | : 6,9 s/word/\/opt\/decoder\/conf/g ### paste '/opt/decoder' instaead of 'word' 31 | 32 | # Matching 33 | ------------------------------------------------------------ 34 | . any character except new line \U non-uppercase character 35 | \s whitespace character \d digit 36 | \D non-digit \x hex digit 37 | \X non-hex digit \o octal digit 38 | \O non-octal digit \h head of word character (a,b,c...z,A,B,C...Z and _) 39 | \H non-head of word character \p printable character 40 | \P like \p, but excluding digits \w word character 41 | \W non-word character \a alphabetic character 42 | \A non-alphabetic character \l lowercase character 43 | \L non-lowercase character \u uppercase character 44 | ------------------------------------------------------------ 45 | 46 | # Quantifier 47 | ------------------------------------------------------------ 48 | * matches 0 or more of the preceding characters, ranges or 49 | metacharacters .* matches everything including empty line 50 | \+ matches 1 or more of the preceding characters... 51 | \= matches 0 or 1 more of the preceding characters... 52 | \{n,m} matches from n to m of the preceding characters... 53 | \{n} matches exactly n times of the preceding characters... 54 | \{,m} matches at most m (from 0 to m) of the preceding characters... 55 | \{n,} matches at least n of of the preceding characters... 56 | where n and m are positive integers (>0) 57 | \{-} matches 0 or more of the preceding atom, as few as possible 58 | \{-n,m} matches 1 or more of the preceding characters... 59 | \{-n,} matches at lease or more of the preceding characters... 60 | \{-,m} matches 1 or more of the preceding characters... 61 | where n and m are positive integers (>0) 62 | ------------------------------------------------------------ 63 | 64 | grouping 65 | ------------------------------------------------------------ 66 | \( \) grouping 67 | \=,\+,*,\{n} etc. quantifiers 68 | abc\t\.\w sequence of characters/ metacharacters, 69 | not containing quantifiers or grouping operators 70 | \| alternation 71 | 72 | Grouping and Backreferences 73 | ------------------------------------------------------------ 74 | & the whole matched pattern 75 | \L the following characters are made lowercase 76 | \0 the whole matched pattern 77 | \U the following characters are made uppercase 78 | \1 the matched pattern in the first pair of \(\) 79 | \E end of \U and \L 80 | \2 the matched pattern in the second pair of \(\) 81 | \e end of \U and \L 82 | \r split line in two at this point 83 | \9 the matched pattern in the ninth pair of \(\) 84 | \l next character made lowercase 85 | ~ the previous substitute string 86 | \u next character made uppercase 87 | ------------------------------------------------------------ 88 | -------------------------------------------------------------------------------- /Linux/7-helps/voip-monitoring.txt: -------------------------------------------------------------------------------- 1 | # Usefull prgrams 2 | apt install sip-tester sngrep 3 | 4 | # --- Asterisk statistic --- 5 | sudo asterisk -rx "core show sysinfo" 6 | sudo asterisk -rx "core show settings" 7 | sudo asterisk -rx "core show calls" 8 | sudo asterisk -rx "core show uptime" 9 | sudo asterisk -rx "core show channels" | grep trunkname 10 | sudo asterisk -rx "pjsip show settings" 11 | sudo asterisk -rx "pjsip list channels" | grep trunkname 12 | sudo asterisk -rx "pjsip show endpoint trunkname" 13 | sudo asterisk -rx "pjsip dialplan show trunkcontext" 14 | sudo asterisk -rx "pjsip show aors" | grep Unavail 15 | sudo asterisk -rx "pjsip show aors" | grep Avail 16 | sudo asterisk -rx "pjsip list endpoints" | grep "In use" 17 | sudo asterisk -rx "pjsip list endpoints" | grep Unavailable 18 | sudo asterisk -rx "pjsip show auths" 19 | sudo asterisk -rx "pjsip show scheduled_tasks" 20 | 21 | # --- Realtime monitoring --- 22 | sudo sngrep -d ens18 -l 100 -cR host 81.88.86.55 # Visual mode 23 | sudo sngrep -d ens18 -l 100 -cRN -O 8_cals.pcap host 8.8.8.8 # PCAP mode 24 | sngrep -I 8_cals.pcap 25 | 26 | tcpdump -i ens18 -w 88.pcap -U -A host 8.8.8.8 27 | tcpdump -A -r 88.pcap 28 | 29 | # --- Create empty wav --- 30 | sudo apt-get install libsox-fmt-all # On CentOS you must recompile SoX to get .mp3 31 | sox -n -r 44100 -c 1 empty.wav trim 0 0 # One channel empty WAV 32 | sox -n output.wav synth 1:0 sine 1000-5000 # Create wav with 1 min sinus from 1000 to 5000 Hz 33 | for f in {1..10}; do 34 | filebase="$RANDOM"-"$RANDOM"-"$RANDOM"; 35 | sox -n "$filebase"-in.wav synth 1:0 sine 1000-"$f"000; 36 | sox -n "$filebase"-out.wav synth 1:0 sine 1000-"$f"000; 37 | done 38 | sox -M ${filebase}-in.wav ${filebase}-out.wav ${filebase}.mp3 # Merge to MP3 39 | -------------------------------------------------------------------------------- /Linux/7-helps/voip/kamailio.txt: -------------------------------------------------------------------------------- 1 | # https://kamailio.org/docs/tutorials/6.0.x/kamailio-install-guide-git/#prerequisites 2 | # Installing--------------------------------------- 3 | 4 | # Sources https://www.kamailio.org/pub/kamailio/ 5 | wget https://github.com/kamailio/kamailio/archive/refs/tags/6.0.1.tar.gz 6 | tar -x -zf 6.0.1.tar.gz 7 | 8 | apt-get install gcc g++ flex bison libmysqlclient-dev -y 9 | apt-get install mysql-server -y 10 | 11 | cd kamailio-6.0.1/ 12 | make cfg 13 | 14 | # make include_modules="db_mysql dialplan tls" cfg 15 | vi src/modules.lst 16 | # include_modules= db_mysql dialplan tls countersacc cfg_rpc ctl sanity xlog siputils textopsx textops registrar usrloc maxfwd pv rr sl tmx tm corex kex jsonrpcs 17 | 18 | make all 19 | make install 20 | make install-systemd-debian 21 | 22 | # If you need just modules: 23 | cat < kamailio_install_with_mysql.sh 24 | #!/bin/bash 25 | apt install kamailio -y 26 | apt-get install libmysqlclient-dev -y 27 | # kamctl srv version 28 | wget https://www.kamailio.org/pub/kamailio/5.7.4/src/kamailio-5.7.4_src.tar.gz && tar -x -zf kamailio-5.7.4_src.tar.gz && cd kamailio-5.7.4 29 | make modules modules=src/modules/db_mysql/ 30 | make install-modules modules=src/modules/db_mysql/ LIBDIR=usr/lib/x86_64-linux-gnu MYSQLON=yes modules_prefix= bin_target=/usr/sbin lib_dir=/usr/lib/x86_64-linux-gnu/kamailio data_target=/usr/share/kamailio data_dir=/usr/share/kamailio data_prefix= 31 | sed -i '/^#!define WITH_MYSQL$/d' /etc/kamailio/kamailio.cfg 32 | sed -i '1i\#!define WITH_MYSQL' /etc/kamailio/kamailio.cfg 33 | kamctl restart && kamctl srv modules 34 | EOF 35 | 36 | # TSHOOT journalctl -u kamailio 37 | # grep mpath /etc/kamailio/kamailio.cfg 38 | # vi utils/kamctl/Makefile 39 | 40 | # Configuring--------------------------------------- 41 | # --- Database 42 | # https://dev.mysql.com/doc/mysql-getting-started/en/ 43 | 44 | apt-get install mysql-server -y 45 | mysql_secure_installation 46 | mysql -u root -p 47 | # ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'; 48 | 49 | # vi /usr/local/etc/kamailio/kamctlrc # or vi /etc/kamailio/kamctlrc 50 | cat < 9 |
Lesson info and tips 10 |
11 |   Defining arrays:
12 |     Fruits=('Apple' 'Banana' 'Orange')
13 |   Or:
14 |     Fruits[0]="Apple"
15 |     Fruits[1]="Banana"
16 |     Fruits[2]="Orange"
17 | Destruction: 18 | unset -v ARRAY 19 | unset -v ARRAY[@] 20 | unset -v ARRAY[*] Destroys a complete array
21 | unset -v ARRAY[N] Destroys the array element at index N 22 | unset -v ARRAY[STRING] Destroys the array element of the associative array at index STRING 23 |
24 |
25 |
26 | 27 | Task list: 28 | - Declare an array with 6 elements 29 | - Print the first element 30 | - Print all elements 31 | - Print the number of elements 32 | - Print the number of characters in third element 33 | - Print 2 elements starting from fourth 34 | 35 |
Hints for the task 36 |
37 |   $ array=(one two three four five six)
38 |   $ echo "${array[0]}"
39 |   $ echo "${array[@]}"
40 |   $ echo "${#array[@]}"
41 |   $ echo "${#array[2]}"
42 |   $ echo "${array[@]:3:2}"
43 | 
44 |
45 |
46 |
If You have read all and understood 47 |
48 | `touch IReadAllAndUndnderstood`{{exec}}
49 | 
50 | -------------------------------------------------------------------------------- /Linux/bash/builtins.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [gnu.org - Bourne Shell Builtins](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bourne-Shell-Builtins) 4 | - [tldp.org - Internal Commands and Builtins](https://tldp.org/LDP/abs/html/internal.html) 5 | - [learnxinyminutes.com - Learn BASH in Y seconds](https://learnxinyminutes.com/docs/bash/) 6 | - execute `help`{{exec}} command 7 | - `man --pager='less -p "^SHELL BUILTIN COMMANDS"' bash`{{exec}} 8 | 9 | Source: 10 | - [savannah.gnu.org - BASH source](http://git.savannah.gnu.org/cgit/bash.git/tree/) 11 | - [github.com - BASH source](https://github.com/bminor/bash) 12 | 13 | Task list: 14 | - Try all bultins 15 | - Read help for all builtin commands using `help`{{exec}} 16 | 17 |
Hints for the task 18 |
19 | :		Returns an exit status of zero.
20 | .		The same as source. Takes a file name as an argument, and executes the commands found in that file.
21 | [		The same as test. Evaluate a conditional expression, and a return a value of true or false.
22 | alias		Define, or display, the shell's command aliases.
23 | bg		Resume a suspended job so that it runs in the background.
24 | bind		Define, or display, the shell's key and function bindings.
25 | break		Exit from a for, while, or select loop.
26 | builtin		Run a builtin command, even if there is a bash function with the same name.
27 | caller		Return the context (execution frame) of a running subroutine. Useful for performing examining the stack when debugging a bash script.
28 | cd		Change the working directory.
29 | command		Run an external or builtin command, even if there is a bash function with the same name.
30 | compgen		Generate auto-completion matches for the specified command.
31 | complete	Specify how arguments should be auto-completed.
32 | compopt		Modify or display options for auto-completion.
33 | continue	Skip to the next, or to another, iteration in a for, while, until, or select loop.
34 | declare		The same as typeset. Declare, display, or assign attributes to variables.
35 | dirs		Display the shell's directory stack, which contains remembered directories.
36 | disown		Remove specified jobs from the current shell.
37 | echo		Write a string to the standard output.
38 | enable		Enable or disable builtin shell commands. Useful when other commands on the system share a builtin command name.
39 | eval		Evaluate arguments and execute them as a command.
40 | exec		Execute a command which replaces the current shell, without creating a new process.
41 | exit		Exit the shell with an optional numeric exit status.
42 | export		Designate that shell variables or functions should be passed to child processes.
43 | fc		Edit, or execute a range of, commands from the history list.
44 | fg		Move a job to the foreground, making it the shell's current job.
45 | getopts		Parse arguments passed to a shell script.
46 | hash		Forget, determine, or display the remembered locations of command executables.
47 | help		Display brief help information about what the shell builtin commands are, and how to use them.
48 | history		Display or modify the history list.
49 | jobs		Display the status of all jobs.
50 | kill		Send a signal to a process.
51 | let		Evaluate arithmetic expressions.
52 | local		Declare a variable with local scope in a bash function.
53 | logout		Exit a login shell with an optional exit status.
54 | mapfile		Read lines from a file or from standard input, and map each line to an element in an array.
55 | popd		Remove directories from the shell's directory stack.
56 | printf		Print formatted text to standard output.
57 | pushd		Add directories to the shell's directory stack.
58 | pwd		Print the absolute path name of the current working directory.
59 | read		Read a line from a file or from standard input, split it into words, and assign each word to a variable.
60 | readarray	Same as mapfile: read lines from a file or stdin, and assign each line to an array element.
61 | readonly	Designate function or variables as read-only, so they cannot be changed.
62 | return		Exit a bash function and return a value.
63 | set		Modify the options of the current shell, changing its behavior. Display the names and values of shell functions and variables.
64 | shift		Shift the positional parameters of the current command to the left.
65 | shopt		Modify certain bash shell options.
66 | source		Same as . (a period). Read commands from a file, and execute them.
67 | test		Test file attributes and compare numeric values.
68 | times		Display the user and system CPU times of the shell process.
69 | trap		Specify a signal trap, to be executed when the shell receives a specific signal.
70 | type		Determine how the shell will interpret a name: as an alias, function, builtin, file, or keyword.
71 | typeset		The same as declare. Declare, display, or assign attributes to variables.
72 | ulimit		Assign limits to the resources available to processes started by the shell.
73 | umask		Set the file creation mask for files created by the shell.
74 | unalias		Remove aliases.
75 | unset		Remove variable or function names.
76 | wait		Wait for a process to exit, then display its return value.
77 | 
78 |
79 |
80 |
If You have read all and understood 81 |
82 | `touch IReadAllAndUndnderstood`{{exec}}
83 | 
84 | -------------------------------------------------------------------------------- /Linux/bash/conditions.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 4 | - [devhints.io - Bash scripting cheatsheet #Conditionals](https://devhints.io/bash#conditionals) 5 | - [tldp.org - Introduction to if](https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html) 6 | - [tldp.org - Advanced Bash-Scripting Guide #Testing and Branching](https://tldp.org/LDP/abs/html/testbranch.html) 7 | - [baeldung.com - Differences Between Single and Double Brackets in Bash](https://www.baeldung.com/linux/bash-single-vs-double-brackets) 8 | - `man --pager='less -p "^\s+Compound Commands"' bash`{{exec}} 9 | - `man --pager='less -p "^CONDITIONAL EXPRESSIONS"' bash`{{exec}} 10 |
11 |
IF-THEN-ELIF-ELSE construction 12 |
13 |   if [[ -z "$string" ]]; then
14 |     echo "String is empty";
15 |   elif [[ -n "$string" ]]; then
16 |     echo "String is not empty";
17 |   else
18 |     echo "This never happens";
19 |   fi
20 |
21 |
22 |
CASE construction 23 |
24 |   case "$variable" in
25 |     "$condition1" )
26 |       command...
27 |     ;;
28 |     "$condition2" )
29 |       command...
30 |     ;;
31 |   esac
32 | 
33 |

34 |
Arithmetical conditions 35 |
36 |   [[ -z STRING ]]    - Empty string
37 |   [[ -n STRING ]]    - Not empty string
38 |   [[ STRING == STRING ]] - Equal
39 |   [[ STRING != STRING ]] - Not Equal
40 |   [[ NUM -eq NUM ]] - Equal
41 |   [[ NUM -ne NUM ]] - Not equal
42 |   [[ NUM -lt NUM ]] - Less than
43 |   [[ NUM -le NUM ]] - Less than or equal
44 |   [[ NUM -gt NUM ]] - Greater than
45 |   [[ NUM -ge NUM ]] - Greater than or equal
46 |   [[ STRING =~ STRING ]] - Regexp
47 |   (( NUM < NUM )) - Numeric conditions
48 |   [[ -o noclobber ]] - If OPTIONNAME is enabled
49 |   [[ ! EXPR ]]       - Not
50 |   [[ X && Y ]]       - And
51 |   [[ X || Y ]]       - Or
52 | 
53 |
54 |
File conditions 55 |
56 |   [[ -e FILE ]] - Exists
57 |   [[ -r FILE ]] - Readable
58 |   [[ -h FILE ]] - Symlink
59 |   [[ -d FILE ]] - Directory
60 |   [[ -w FILE ]] - Writable
61 |   [[ -s FILE ]] - Size is > 0 bytes
62 |   [[ -f FILE ]] - File
63 |   [[ -x FILE  - 	Executable
64 |   [[ FILE1 -nt FILE2 ]] - 1 is more recent than 2
65 |   [[ FILE1 -ot FILE2 ]] - 2 is more recent than 1
66 |   [[ FILE1 -ef FILE2 ]] - Same files
67 | 
68 |

69 | 70 | Task list: 71 | - Read variables `age` and `name` from stdin 72 | - Check if `name = Steve` and `age > 18` type 'Hello, Steve!' 73 | 74 |
Hints for the task 75 |
76 | Task 1:
77 |   $ read age
78 |   $ read name
79 | Task 2:
80 |   $ if [[ "$name" == "Steve" ]] && [[ "$age" -eq 15 ]]; then
81 |   > echo "Hello, Steve!";
82 |   > fi
83 | 
84 |
85 |
86 |
If You have read all and understood 87 |
88 | `touch IReadAllAndUndnderstood`{{exec}}
89 | 
90 | -------------------------------------------------------------------------------- /Linux/bash/functions.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 4 | - [Google - BASH functions examples](https://www.google.com/search?q=bash+functions+example) 5 | - [devhints.io - Bash scripting cheatsheet #Functions](https://devhints.io/bash#functions) 6 | - [gnu.org - Shell Functions](https://www.gnu.org/software/bash/manual/html_node/Shell-Functions.html) 7 | - [tldp.org - Functions](https://tldp.org/LDP/abs/html/functions.html) 8 | - `man --pager='less -p "^FUNCTIONS"' bash`{{exec}} 9 |
10 |
FUNCTION syntax 11 |
12 |   function NAME {
13 |     commands;
14 |   }
15 | Or: 16 | NAME () { 17 | commands; 18 | }
19 | Call declared function: 20 | NAME arg1 arg2
21 | Arguments: 22 | $# Number of arguments 23 | $* All positional arguments (as a single word) 24 | $@ All positional arguments (as separate strings) 25 | $1 First argument and so on 26 | $_ Last argument of the previous command 27 |
28 |

29 | 30 | Task list: 31 | - Write a function that cleans log files in a given directory older than 30 days and gives an error if the directory does not exist 32 | 33 |
Hints for the task 34 |
35 | Task 1:
36 |   $ log_cleanup (){
37 |      if [[ -d "$1" ]]
38 |      then
39 |        logger "[ INFO ] - Running Cleanup On " $1 " Older Logs - 30 days"
40 |        find -name "$1/*.log" -type f -mtime +30 -delete
41 |        logger "[ SUCCESS] - Cleanup Completed"
42 |      else
43 |        logger "[ ERROR ] - log_cleanup () : Directory path wrong... Cleanup has not happened..."
44 |        return 1
45 |      fi
46 |    }
47 |   $ log_cleanup "/home/logs/"
48 | 
49 |
50 |
51 |
If You have read all and understood 52 |
53 | `touch IReadAllAndUndnderstood`{{exec}}
54 | 
55 | -------------------------------------------------------------------------------- /Linux/bash/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Introduction to BASH shell", 3 | "description": "Learn and practice with BASH scripting", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground" : "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/8 - BASH builtin commands [52:30]", 13 | "text": "builtins.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/8 - Variables and Variable expansion [45:00]", 17 | "text": "vars_subst.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/8 - Arrays [37:30]", 21 | "text": "arrays.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/8 - Functions [30:00]", 25 | "text": "functions.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "5/8 - The conditional expressions [22:30]", 29 | "text": "conditions.md", 30 | "verify": "scripts/check.sh" 31 | },{ 32 | "title": "6/8 - Loops [15:00]", 33 | "text": "loops.md", 34 | "verify": "scripts/check.sh" 35 | },{ 36 | "title": "7/8 - I/O Redirections [07:30]", 37 | "text": "redirections.md", 38 | "verify": "scripts/check.sh" 39 | },{ 40 | "title": "8/8 - Job Control [00:00]", 41 | "text": "jobs.md", 42 | "verify": "scripts/check.sh" 43 | } 44 | ], 45 | "finish": { 46 | "text": "service/finish.md" 47 | } 48 | }, 49 | "backend": { 50 | "imageid": "ubuntu" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Linux/bash/jobs.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 4 | - [gnu.org - Job Control](https://www.gnu.org/software/bash/manual/html_node/Job-Control.html) 5 | - [tldp.org - Job Control Commands](https://tldp.org/LDP/abs/html/x9644.html) 6 | - `man --pager='less -p "^JOB CONTROL"' bash`{{exec}} 7 |
8 |
Job Control Builtins 9 |
10 |   bg [jobspec …]
11 |       Resume each suspended job jobspec in the background.
12 | fg [jobspec] 13 | Resume the job jobspec in the foreground and make it the current job.
14 | jobs 15 | Lists the active jobs.
16 | kill [-s sigspec] [-n signum] [-sigspec] jobspec or pid 17 | Send a signal specified by sigspec or signum to the process named by job
18 | wait [-fn] [-p varname] [jobspec or pid …] 19 | Wait until the child process specified by each process ID pid or job specification jobspec exits and return the exit status of the last command waited for.
20 | disown [-ar] [-h] [jobspec … | pid … ] 21 | Remove each jobspec from the table of active jobs.
22 | suspend [-f] 23 |
24 |
25 |
26 | 27 | Task list: 28 | - Create sliping process and detach it 29 | - List all jobs 30 | - Make sliping process current 31 | - Kill this process 32 | 33 |
Hints for the task 34 |
35 | Task 1:
36 |   $ sleep 10000 &
37 | 
38 | Task 2: 39 | $ jobs 40 | $ fg 1 41 | Ctrl+C 42 | $ sleep 10000 & 43 | $ jobs -l 44 | $ kill 10708 45 |
46 |
47 |
48 |
If You have read all and understood 49 |
50 | `touch IReadAllAndUndnderstood`{{exec}}
51 | 
52 | -------------------------------------------------------------------------------- /Linux/bash/loops.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 4 | - [devhints.io - Bash scripting cheatsheet #Loops](https://devhints.io/bash#loops) 5 | - [gnu.org - Looping Constructs](https://www.gnu.org/software/bash/manual/html_node/Looping-Constructs.html) 6 | - [tldp.org - Loops](https://tldp.org/LDP/abs/html/loops1.html) 7 |
8 |
UNTIL construction 9 |
10 |   until CONDITION; do
11 |     consequent-commands;
12 |   done
13 | 
14 |
15 |
WHILE construction 16 |
17 |   while CONDITION; do
18 |     consequent-commands;
19 |   done
20 | 
21 |
22 |
FOR-IN construction 23 |
24 |   for VARIABLE in […] ; do
25 |     commands;
26 |   done
27 | 
28 |
29 |
C-FOR construction 30 |
31 |   for (( INIT ; CONDITION ; INCREMENT )) ; do
32 |     commands;
33 |   done
34 | 
35 |
36 |
37 | 38 | Task list: 39 | - Declare an array with 6 elements 40 | - Print all elements each of them on new line with different loop styles 41 | 42 |
Hints for the task 43 |
44 | Task 1:
45 |   $ array=(one two three four five six)
46 | Task 2: 47 | $ c=0 48 | $ until [ $c -eq ${#array[@]} ]; do 49 | > echo ${array[$c]}; 50 | > ((c++)); 51 | > done
52 | $ c=0 53 | $ while [ $c -lt ${#array[@]} ]; do 54 | > echo ${array[$c]}; 55 | > ((c++)); 56 | > done
57 | $ for item in "${array[@]}"; do 58 | > echo "$item"; 59 | > done
60 | $ for (( c=0 ; c < ${#array[@]} ; c++ )); do 61 | > echo ${array[$c]}; 62 | > done 63 |
64 |
65 |
66 |
If You have read all and understood 67 |
68 | `touch IReadAllAndUndnderstood`{{exec}}
69 | 
70 | -------------------------------------------------------------------------------- /Linux/bash/redirections.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 4 | - [devhints.io - Bash scripting cheatsheet #Miscellaneous](https://devhints.io/bash#miscellaneous) 5 | - [gnu.org - Redirections](https://www.gnu.org/software/bash/manual/html_node/Redirections.html) 6 | - [tldp.org - I/O Redirection](https://tldp.org/LDP/abs/html/io-redirection.html) 7 | - `man --pager='less -p "^REDIRECTION"' bash`{{exec}} 8 |
9 |
File descriptors 10 |
11 |   0	is stdin
12 |   1	is stdout
13 |   2	is stderr
14 | 
15 |
16 |
Redirect operators 17 |
18 |   M>N
19 |     - "M" is a file descriptor, which defaults to 1, if not explicitly set.
20 |     - "N" is a filename.
21 |     - File descriptor "M" is redirect to file "N."
22 | M>&N 23 | - "M" is a file descriptor, which defaults to 1, if not set. 24 | - "N" is another file descriptor.
25 | < FILENAME 26 | - Accept input from a file.
27 | CMD | CMD 28 | - Pipe. 29 | - General purpose process and command chaining tool 30 |
31 |
32 |
33 | 34 | Task list: 35 | - Write string to "File" 36 | - Open "File" and assign fd 3 to it 37 | - Read 4 characters 38 | - Write a decimal point 39 | - Close fd 3 40 | 41 |
Hints for the task 42 |
43 |   $ echo 1234567890 > File
44 |   $ exec 3<> File
45 |   $ read -n 4 <&3
46 |   $ echo -n . >&3
47 |   $ exec 3>&-
48 | 
49 |
50 |
51 |
If You have read all and understood 52 |
53 | `touch IReadAllAndUndnderstood`{{exec}}
54 | 
55 | -------------------------------------------------------------------------------- /Linux/bash/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/bash/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Linux/bash/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | # If You want to read manual pages, run tmux, press Ctrl+b " (double quote) or % 2 | # Ctrl+b then DOWN/UP, to navigate between panes (Ctrl+b Ctrl+DOWN/UP to resize) 3 | # Ctrl-? for Shortcuts, or Ctrl-B :list-commands 4 | # Open manual in one pane and practice in other! (Ctrl+b x to close pane) 5 | -------------------------------------------------------------------------------- /Linux/bash/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Linux/bash/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man --pager='less -p "OPTIONS"' bash`{{exec}} 12 | - `man --pager='less -p "Commands for Moving"' bash`{{exec}} 13 | 14 | Get source code: 15 | 16 | - [gnu bash](https://git.savannah.gnu.org/cgit/bash.git/) 17 | 18 | And watch some video tutorials: 19 | 20 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 21 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 22 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 23 | 24 | Now, lets start! 25 | -------------------------------------------------------------------------------- /Linux/bash/vars_subst.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [tldp.org - Introduction to Variables and Parameters](https://tldp.org/LDP/abs/html/variables.html) 4 | - [gnu.org - Shell Variables](https://www.gnu.org/software/bash/manual/html_node/Shell-Variables.html) 5 | - [gnu.org - Shell Parameter Expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html) 6 | - [tldp.org - Parameter Substitution](https://tldp.org/LDP/abs/html/parameter-substitution.html) 7 | - [tldp.org - Manipulating Variables](https://tldp.org/LDP/abs/html/manipulatingvars.html) 8 | - [tldp.org - Regular Expressions](https://tldp.org/LDP/abs/html/regexp.html) 9 | - `man --pager='less -p "Parameter Expansion"' bash`{{exec}} 10 | - `man --pager='less -p "^\s+Command Substitution"' bash`{{exec}} 11 |
12 |
List of builtin variables 13 |
14 | set    Run this command to see all current variables
15 | $* / $@		Function/script positional parameters (arguments). Expand as follows:
16 |   $* and $@ are the same as $1 $2 ... (note that it generally makes no sense to leave those unquoted)
17 |   "$*" is the same as "$1 $2 ..." 1
18 |   "$@" is the same as "$1" "$2" ...
19 | $#		Number of positional parameters passed to the script or function
20 | $!		Process ID of the last (righ-most for pipelines) command in the most recently job put into the background (note that it's not necessarily the same as the job's process group ID when job control is enabled)
21 | $$		ID of the process that executed bash
22 | $?		Exit status of the last command
23 | $n		Positional parameters, where n=1, 2, 3, ..., 9
24 | ${n}		Positional parameters (same as above), but n can be > 9
25 | $0		In scripts, path with which the script was invoked; with bash -c 'printf "%s\n" "$0"' name args': name (the first argument after the inline script), otherwise, the argv[0] that bash received.
26 | $_		Last field of the last command
27 | $IFS		Internal field separator
28 | $PATH		PATH environment variable used to look-up executables
29 | $OLDPWD		Previous working directory
30 | $PWD		Present working directory
31 | $FUNCNAME	Array of function names in the execution call stack
32 | $BASH_SOURCE	Array containing source paths for elements in FUNCNAME array. Can be used to get the script path.
33 | $BASH_ALIASES	Associative array containing all currently defined aliases
34 | $BASH_REMATCH	Array of matches from the last regex match
35 | $BASH_VERSION	Bash version string
36 | $BASH_VERSINFO	An array of 6 elements with Bash version information
37 | $BASH		Absolute path to the currently executing Bash shell itself (heuristically determined by bash based on argv[0] and the value of $PATH; may be wrong in corner cases)
38 | $BASH_SUBSHELL	Bash subshell level
39 | $UID		Real (not effective if different) User ID of the process running bash
40 | $PS1		Primary command line prompt; see Using the PS* Variables
41 | $PS2		Secondary command line prompt (used for additional input)
42 | $PS3		Tertiary command line prompt (used in select loop)
43 | $PS4		Quaternary command line prompt (used to append info with verbose output)
44 | $RANDOM		A pseudo random integer between 0 and 32767
45 | $REPLY		Variable used by read by default when no variable is specified. Also used by select to return the user-supplied value
46 | $PIPESTATUS	Array variable that holds the exit status values of each command in the most recently executed foreground pipeline.
47 | 
48 |

49 |
Parameter Substitution 50 |
51 |   ${parameter} - Same as $parameter, i.e., value of the variable parameter.
52 |   ${parameter-default}, ${parameter:-default}      - If parameter not set, use default.
53 |   ${parameter=default}, ${parameter:=default}      - If parameter not set, set it to default.
54 |   ${parameter+alt_value}, ${parameter:+alt_value}  - If parameter set, use alt_value, else use null string.
55 |   ${parameter?err_msg}, ${parameter:?err_msg}      - If parameter set, use it, else print err_msg and abort the script with an exit status of 1.
56 | 
57 |

58 |
Manipulating Strings 59 |
60 |   ${#var}                            - Number of characters in $var.
61 |   ${#*} and ${#@}   - Number of positional parameters
62 |   ${var#pattern}, ${var##pattern}    - Remove from $var the shortest#/longest## part of $Pattern
63 |   ${string%substring}, ${string%%substring} - Remove shortest%/longest%% match of $substring from back of $string.
64 |   ${string:position}                 - Extracts substring from $string at $position as number.
65 |   ${string:position:length}          - Extracts $length characters of substring from $string at $position.
66 |   ${string/substring/replacement}    - Replace first match of $substring with $replacement.
67 |   ${string//substring/replacement}   - Replace all matches of $substring with $replacement.
68 |   ${string/#substring/replacement}   - If $substring matches front end of $string, substitute $replacement for $substring.
69 |   ${string/%substring/replacement}   - If $substring matches back end of $string, substitute $replacement for $substring.
70 | 
71 |
72 |
73 | 74 | Task list: 75 | - Initiate variable 'string' with value '01234567890abcdefgh' 76 | - Display values from positions 7 to 9 of a 'string' variable 77 | - Display 'string' value length 78 | - Unset 'string' variable 79 | - Read manual and try other types of variable expansion 80 | 81 |
Hints for the task 82 |
83 |   $ string=01234567890abcdefgh
84 |   $ echo ${string:7:3}
85 |   $ echo ${#string}
86 |   $ string=
87 | 
88 |
89 |
90 |
If You have read all and understood 91 |
92 | `touch IReadAllAndUndnderstood`{{exec}}
93 | 
94 | -------------------------------------------------------------------------------- /Linux/common/coreutils.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [gnu.org - GNU core utilities top page](https://www.gnu.org/software/coreutils/) 4 | - [gnu.org - GNU Coreutils online info](https://www.gnu.org/software/coreutils/manual/html_node/index.html) 5 | - `info coreutils`{{exec}} 6 | - [wikipedia.org - util-linux](https://en.wikipedia.org/wiki/Util-linux) 7 |
8 | 9 | Source code: 10 | - [util-linux](https://github.com/util-linux/util-linux) 11 | - [GNU Coreutils](https://github.com/coreutils/coreutils) 12 | 13 |
14 |
Basic 'info' command keys 15 |
16 |   H    - Open or close help window.
17 |   q    - Quit Info.
18 |   Home - Go to the beginning of current node.
19 |   End  - Go to the end of current node.
20 |   TAB  - Go to the next hypertext link.
21 |   Enter - Follow the hypertext link under the cursor.
22 |   l    - Go back to the last node.
23 |   [    - Go to the previous node in the document.
24 |   ]    - Go to the next node in the document.
25 |   t    - Go to the top node of this document.
26 |   /    - Read a string and search for it.
27 |   Ctrl-x n - Repeat last search in the same direction.
28 | 
29 |
30 |
Sorted list of GNU Coreutils 31 |
32 | Output of entire files       cat tac nl od base32 base64
33 | Formatting file contents     fmt pr fold
34 | Output of parts of files     head tail split csplit
35 | Summarizing files            wc sum cksum b2sum md5sum sha1sum sha2
36 | Operating on sorted files    sort shuf uniq comm ptx tsort
37 | Operating on fields          cut paste join
38 | Operating on characters      tr expand unexpand
39 | Directory listing            ls dir vdir dircolors
40 | Basic operations             cp dd install mv rm shred
41 | Special file types           mkdir rmdir unlink mkfifo mknod ln link readlink
42 | Changing file attributes     chgrp chmod chown touch
43 | Disk usage                   df du stat sync truncate
44 | Printing text                echo printf yes
45 | Conditions                   false true test expr
46 | Redirection                  tee
47 | File name manipulation       dirname basename pathchk mktemp realpath
48 | Working context              pwd stty printenv tty
49 | User information             id logname whoami groups users who
50 | System context               date arch nproc uname hostname hostid uptime
51 | SELinux context              chcon runcon
52 | Modified command invocation  chroot env nice nohup stdbuf timeout
53 | Process control              kill
54 | Delaying                     sleep
55 | Numeric operations           factor numfmt seq
56 | 
57 |

58 | 59 | Task list: 60 | - Learn more about GNU coreutils and util-linux 61 | - Try to execute all GNU Coreutils and util-linux tools 62 | 63 |
Hints for the task 64 |
65 | Task 1:
66 |   $ info coreutils
67 | 
68 |
69 |
70 |
If You have read all and understood 71 |
72 | `touch IReadAllAndUndnderstood`{{exec}}
73 | 
74 | -------------------------------------------------------------------------------- /Linux/common/explore_fs.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | - [linuxfoundation.org - Filesystem Hierarchy Standard](https://refspecs.linuxfoundation.org/fhs.shtml) 3 | 4 | Manual pages: 5 | - `man pwd`{{exec}} 6 | - `man ls`{{exec}} 7 | - `man hier`{{exec}} 8 | - `man file-hierarchy`{{exec}} 9 | - `apt install tree -y && man tree`{{exec}} 10 |
11 |
Filesystem Hierarchy as in FHS v3.0 12 | 13 |
14 |   /bin   - Essential user command binaries (for use by all users)
15 |   /boot  - Static files of the boot loader
16 |   /dev   - Device files
17 |   /etc   - Host-specific system configuration
18 |   /home  - User home directories (optional)
19 |   /lib   - Essential shared libraries and kernel modules
20 |   /media - Mount point for removable media
21 |   /mnt   - Mount point for a temporarily mounted filesystem
22 |   /opt   - Add-on application software packages
23 |   /root  - Home directory for the root user (optional)
24 |   /run   - Run-time variable data
25 |   /sbin  - System binaries
26 |   /srv   - Data for services provided by this system
27 |   /tmp   - Temporary files
28 | 
29 | 30 |

31 | 32 | Task list: 33 | - Read manual pages for 'pwd' and 'ls' 34 | - Install 'tree' utility 35 | - Explore fs with 'tree' 36 | 37 |
Hints for the task 38 |
39 | Task 1:
40 |   $ man pwd
41 |   $ man ls
42 | 
43 | Task 2: 44 | $ sudo apt install tree 45 | $ tree -a / | less 46 |
47 |
48 |
49 |
If You have read all and understood 50 |
51 | `touch IReadAllAndUndnderstood`{{exec}}
52 | 
53 | -------------------------------------------------------------------------------- /Linux/common/find.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [opengroup.org - find](https://link.org/) 4 | - [man7.org - find](https://link.org/) 5 | - [redhat.com - 10 ways to use the Linux 'find'](https://www.redhat.com/sysadmin/linux-find-command) 6 | 7 | Source code: 8 | 9 | - [findutils](https://git.savannah.gnu.org/cgit/findutils.git/) 10 | 11 | Manual pages: 12 | - `man find`{{exec}} 13 |
14 |
Most useful 'find' scenarios 15 |
16 |   $ find / -name "foo.txt"
17 |   $ find / -iname "*foo*txt"
18 |   $ find . -name "*txt" -exec grep -Hi sometext {} \;
19 |   $ find ~ -type f -empty
20 |   $ find /var/log -iname "*~" -o -iname "*log*" -mtime +30
21 |   $ find . -type f -perm 0777 -print
22 |   $ find / -perm /u=r
23 |   $ find . -type f -name "*.tmp" -exec rm -f {} \;
24 |   $ find / -cmin -60
25 |   $ find / -type f -name *.mp3 -size +10M -size -20M -exec rm {} \;
26 | 
27 |
28 |
The find -exec command format 29 |
30 | The find -exec command will take the following format:
31 | find [path] [arguments] -exec [command] [placeholder] [delimiter]
32 | {} in placeholder replaced by the current filename result found by find.
33 | Delimeter may be \; or + 34 | \; will execute command on each result 35 | + all results will be passed to command in one line 36 |
37 |
38 |
39 | 40 | Task list: 41 | - Create 50 files with names like fileNN.txt 42 | - Delete all files with find command with -exec argument 43 | 44 |
Hints for the task 45 |
46 | Task 1:
47 |   $ touch file{1..50}.txt
48 | 
49 | Task 2: 50 | $ find . -iname "file*.txt" -exec rm {} \; 51 |
52 |
53 |
54 |
If You have read all and understood 55 |
56 | `touch IReadAllAndUndnderstood`{{exec}}
57 | 
58 | -------------------------------------------------------------------------------- /Linux/common/grep_sed.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [tutorialspoint.com - SED tutorial](https://www.tutorialspoint.com/sed/index.htm) 4 | - [digitalocean.com - The Basics of Using the Sed](https://www.digitalocean.com/community/tutorials/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux) 5 | - [gnu.org - sed, a stream editor](https://www.gnu.org/software/sed/manual/sed.html) 6 | - [gnu.org - sed commands](https://www.gnu.org/software/sed/manual/html_node/sed-commands-list.html) 7 | 8 | Manual pages: 9 | - `man grep`{{exec}} 10 | - `man sed`{{exec}} 11 | 12 | Interesting video tutorials: 13 | - [youtube.com - Learning Sed Is Beneficial For Linux Users](https://www.youtube.com/watch?v=EACe7aiGczw) 14 | - [youtube.com - Linux Crash Course - The sed Command](https://www.youtube.com/watch?v=nXLnx8ncZyE) 15 |
16 |
sed - stream editor 17 |
18 | SYNOPSIS:
19 |   sed [-n] script [file...]
20 |   sed [-n] -e script [-e script]... [-f script_file]... [file...]
21 |   sed [-n] [-e script]... -f script_file [-f script_file]... [file...]
22 | 
23 |
24 |
grep - search a file for a pattern 25 |
26 | SYNOPSIS:
27 |   grep [-E|-F] [-c|-l|-q] [-insvx] -e pattern_list [-e pattern_list]... [-f pattern_file]... [file...]
28 |   grep [-E|-F] [-c|-l|-q] [-insvx] [-e pattern_list]... -f pattern_file [-f pattern_file]... [file...]
29 |   grep [-E|-F] [-c|-l|-q] [-insvx] pattern_list [file...]
30 | 
31 |

32 | 33 | Task list: 34 | - Use the grep utility to print the line number containing 'PasswordAuthentication' in /etc/ssh/ssh_config 35 | - Reverse the "PasswordAuthentication yes" setting with SED, and uncomment it 36 | 37 |
Hints for the task 38 |
39 | Task 1:
40 |   $ grep -n PasswordAuthentication /etc/ssh/ssh_config
41 |   25:PasswordAuthentication yes
42 |   $ sed -i '25c PasswordAuthentication no' /etc/ssh/ssh_config
43 | 
44 |
45 |
46 |
If You have read all and understood 47 |
48 | `touch IReadAllAndUndnderstood`{{exec}}
49 | 
50 | -------------------------------------------------------------------------------- /Linux/common/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Common linux utilities", 3 | "description": "Most common linux utilities theory and practice", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground": "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/6 - Explore filesystem [50:00]", 13 | "text": "explore_fs.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/6 - GNU Coreutils & util-linux[40:00]", 17 | "text": "coreutils.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/6 - find files [30:00]", 21 | "text": "find.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/6 - GNU tape archiver [20:00]", 25 | "text": "tar.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "5/6 - GREP and SED [10:00]", 29 | "text": "grep_sed.md", 30 | "verify": "scripts/check.sh" 31 | },{ 32 | "title": "6/6 - VIM text editor [00:00]", 33 | "text": "vim.md", 34 | "verify": "scripts/check.sh" 35 | } 36 | ], 37 | "finish": { 38 | "text": "service/finish.md" 39 | } 40 | }, 41 | "backend": { 42 | "imageid": "ubuntu" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Linux/common/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/common/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Linux/common/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | tmux 2 | 3 | #You are running 'tmux' now, press Ctrl+b " (double quote) or % to split panes 4 | #Ctrl+b then DOWN/UP, to navigate between them (Ctrl+b Ctrl+DOWN/UP to resize) 5 | #Open manual in one pane and practice in other! (Ctrl+b x to close pane) 6 | -------------------------------------------------------------------------------- /Linux/common/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished this scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [OpenGroup - POSIX Utilities](https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html) 6 | - [kernel.org - Linux MAN pages](https://www.kernel.org/doc/man-pages/) 7 | - [man7.org - intro(1) Introduction to user commands](https://man7.org/linux/man-pages/man1/intro.1.html) 8 | - `man find`{{exec}} 9 | - `man grep`{{exec}} 10 | - `man sed`{{exec}} 11 | 12 | And watch some videos: 13 | 14 | - [The 50 Most Popular Linux & Terminal Commands](https://www.youtube.com/watch?v=ZtqBQ68cfJc) 15 | - [5 Linux Terminal Applications You Need to know](https://www.youtube.com/watch?v=E8Ww39z_28A) 16 | 17 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/common) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/localhost)! 18 | 19 | -------------------------------------------------------------------------------- /Linux/common/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to Common Linux Utilities scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [OpenGroup - POSIX Utilities](https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html) 6 | - [kernel.org - Linux MAN pages](https://www.kernel.org/doc/man-pages/) 7 | - [man7.org - intro(1) Introduction to user commands](https://man7.org/linux/man-pages/man1/intro.1.html) 8 | - `man 1 intro`{{exec}} 9 | 10 | Get source code: 11 | 12 | - [util-linux](https://github.com/util-linux/util-linux) 13 | - [GNU Coreutils](https://github.com/coreutils/coreutils) 14 | 15 | And watch some videos: 16 | 17 | - [The 50 Most Popular Linux & Terminal Commands](https://www.youtube.com/watch?v=ZtqBQ68cfJc) 18 | - [5 Linux Terminal Applications You Need to know](https://www.youtube.com/watch?v=E8Ww39z_28A) 19 | 20 | Now, lets start! 21 | -------------------------------------------------------------------------------- /Linux/common/tar.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [gnu.org - GNU Tar](https://www.gnu.org/software/tar/) 4 | - [gnu.org - GNU tar: an archiver tool](https://www.gnu.org/software/tar/manual/tar.html) 5 | - [cheat.sh - Tar cheatsheet](https://cheat.sh/tar) 6 | 7 | Manual pages: 8 | - `tar --help`{{exec}} 9 | - `man tar`{{exec}} 10 |
11 |
TAR command syntax 12 |
tar [-options] <name of the tar archive> [files or directories which to add into archive]
13 |   -A, --catenate, --concatenate — append tar files to an archive
14 |   -c, --create         — create a new archive
15 |   -a, --auto-compress  — additionally compress the archive with a compressor which 
16 |                                           will be automatically determined by the file name extension
17 |                                           of the archive. If the archive's name ends with *.tar.gz
18 |                                           then use gzip, if *.tar.xz then use xz, *.tar.zst for Zstandard
19 |   -r, --append         — append files to the end of an archive
20 |   -x, --extract, --get — extract files from an archive
21 |   -f, --file           — specify the archive's name
22 |   -t, --list           — show a list of files and folders in the archive
23 |   -v, --verbose        — show a list of processed files
24 | 
25 |
26 |
Basic usage 27 |
 
28 |   $ tar -cvf archive.tar README.txt src
29 |       Create an archive file archive.tar from the file README.txt and directory src.
30 | $ tar -xvf archive.tar 31 | Extract contents for the archive.tar into the current directory.
32 | $ tar -cavf archive.tar.gz README.txt src 33 | Create an archive file archive.tar.gz from the file README.txt and directory src and compress it with gzip.
34 | $ tar -xvf archive.tar.gz 35 | Extract contents for the archive.tar.gz into the current directory. 36 |
37 |

38 | 39 | Task list: 40 | - Create compressed archive automatically based on result file extension 41 | - Decompress this archive into the ~/tmp/ folder 42 | 43 |
Hints for the task 44 |
45 | Task 1:
46 |   $ echo "Content" | tee file{00..10}.txt
47 |   $ tar -caf files.xz file??.txt
48 |   $ tar -tvf files.xz
49 | 
50 | Task 2: 51 | $ mkdir ~/tmp/ 52 | $ tar -xf files.xz -C ~/tmp/ 53 |
54 |
55 |
56 |
If You have read all and understood 57 |
58 | `touch IReadAllAndUndnderstood`{{exec}}
59 | 
60 | -------------------------------------------------------------------------------- /Linux/common/vim.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [vim.org - VIM documentation](https://www.vim.org/docs.php) 4 | - [wikibooks.org - VIM](https://en.wikibooks.org/wiki/Vim) 5 | - [devhints.io - VIM Cheatsheet](https://devhints.io/vim) 6 | - [openvim.com - Interactive VIM tutorial](https://openvim.com/) 7 | - [danielmiessler.com - Learn Vim For the Last Time](https://danielmiessler.com/study/vim/) 8 | - [learnxinyminutes.com - Vim](https://learnxinyminutes.com/docs/vim/) 9 | - [learnxinyminutes.com - VimL aka Vim script](https://learnxinyminutes.com/docs/vimscript/) 10 | 11 | Manual pages: 12 | - `man vim`{{exec}} 13 | - `vimtutor`{{exec}} 14 |
15 |
Most common scenario for using VIM 16 |
17 |   This is most common scenario for using VIM
18 |     $ vim filename
19 |       i
20 |       Some test
21 |       :wq
22 |     $ cat filename
23 | 
24 |
25 |
26 | 27 | Task list: 28 | - Edit /etc/sshd_config 29 | - Find 'PermitRootLogin yes' and repalce it to 'PermitRootLogin no' 30 | - Save and exit 31 | 32 |
Hints for the task 33 |
34 | Task 1:
35 |   $ vim PermitRootLogin yes
36 | 
37 | Task 2: 38 | In command mode type: 39 | :%s/PermitRootLogin yes/PermitRootLogin no/gc 40 | then 41 | :wq 42 |
43 |
44 |
45 |
If You have read all and understood 46 |
47 | `touch IReadAllAndUndnderstood`{{exec}}
48 | 
49 | -------------------------------------------------------------------------------- /Linux/localhost/app_management.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [ubuntu.com - Package management](https://ubuntu.com/server/docs/package-management) 4 | - [debian.org - APT](https://wiki.debian.org/Apt) 5 | - [debian.org - apt(8)](https://manpages.debian.org/bullseye/apt/apt.8.en.html) 6 | - [man7.org - dpkg(1)](https://man7.org/linux/man-pages/man1/dpkg.1.html) 7 |
8 |
Lesson info and tips 9 |
10 |   $ sudo apt install nmap   - Install a Package
11 |   $ sudo apt remove nmap    - Remove a Package
12 |   $ sudo apt update         - Update the package index
13 |   $ sudo apt upgrade        - Upgrade packages
14 | 
15 |

16 | 17 | Task list: 18 | - Install nmap 19 | - Remove nmap 20 | 21 |
Hints for the task 22 |
23 | Task 1:
24 |   $ sudo apt install nmap
25 | 
26 | Task 2: 27 | $ sudo apt remove nmap 28 |
29 |
30 |
31 |
If You have read all and understood 32 |
33 | `touch IReadAllAndUndnderstood`{{exec}}
34 | 
35 | -------------------------------------------------------------------------------- /Linux/localhost/cron.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [github.com - Vixie Cron](https://github.com/vixie/cron) 4 | - [wikipedia.org - Cron](https://en.wikipedia.org/wiki/Cron) 5 | - `man cron`{{exec}} 6 | - [freedesktop.org - systemd.timer](https://www.freedesktop.org/software/systemd/man/systemd.timer.html#) 7 | - [freedesktop.org - systemd.time](https://www.freedesktop.org/software/systemd/man/systemd.time.html#) 8 | 9 | Manual pages: 10 | - `man systemd.timer`{{exec}} 11 | - `man systemd.time`{{exec}} 12 |
13 |
crontab cheatsheet 14 |
15 |   * * * * * - every second
16 |   minute hour day(of month) month day(of week) 
17 | 
18 |
19 |
systemd.time shorthands 20 |
21 |     minutely → *-*-* *:*:00
22 |       hourly → *-*-* *:00:00
23 |        daily → *-*-* 00:00:00
24 |      monthly → *-*-01 00:00:00
25 |       weekly → Mon *-*-* 00:00:00
26 |       yearly → *-01-01 00:00:00
27 |    quarterly → *-01,04,07,10-01 00:00:00
28 | semiannually → *-01,07-01 00:00:00
29 | 
30 |

31 | 32 | Task list: 33 | - Create script, that ping host 1.1.1.1 one time and write 'results.ping' into users folder 34 | - Create cron job, that runs script every 1 minute 35 | - Make the same with systemd.timer 36 | 37 |
Hints for the task 38 |
39 | Task 1:
40 |   $ vi /usr/local/sbin/ping-1-1-1-1.sh
41 |     #!/bin/sh
42 |     ping -c 1 1.1.1.1 > ~/results.ping
43 |   
44 | $ chmod +x /usr/local/sbin/ping-1-1-1-1.sh 45 |
46 | Task 2: 47 | $ systemctl status cron.service 48 | $ crontab -e 49 | * * * * * ping-1-1-1-1.sh 2>&1 50 | $ journalctl _SYSTEMD_UNIT=cron.service 51 |
52 | Task 3: 53 | $ mkdir -p ${XDG_CONFIG_HOME:-~/.config}/systemd/user/ 54 |
55 | $ vi ${XDG_CONFIG_HOME:-~/.config}/systemd/user/ping-1-1-1-1.service 56 | [Unit] 57 | Description=Small test ping 1.1.1.1 service 58 | [Service] 59 | Type=oneshot 60 | ExecStart=ping-1-1-1-1.sh 61 | [Install] 62 | RequiredBy=ping-1-1-1-1.timer 63 |
64 | $ vi ${XDG_CONFIG_HOME:-~/.config}/systemd/user/ping-1-1-1-1.timer 65 | [Unit] 66 | [Timer] 67 | OnCalendar=minutely 68 | Persistent=true 69 | [Install] 70 | WantedBy=timers.target 71 |
72 | // only under dockerized env ---- 73 | $ loginctl enable-linger root 74 | $ XDG_RUNTIME_DIR=/run/user/$(id -u root) systemctl --user enable ping-1-1-1-1.timer 75 | $ XDG_RUNTIME_DIR=/run/user/$(id -u root) systemctl --user enable ping-1-1-1-1.service 76 | $ XDG_RUNTIME_DIR=/run/user/$(id -u root) systemctl --user start ping-1-1-1-1.timer 77 | // only under dockerized env ---- 78 |
79 | $ systemctl --user enable ping-1-1-1-1.timer 80 | $ systemctl --user enable ping-1-1-1-1.service 81 | $ systemctl --user start ping-1-1-1-1.timer 82 | $ systemctl --user status ping-1-1-1-1.timer 83 |
84 |
85 |
86 |
If You have read all and understood 87 |
88 | `touch IReadAllAndUndnderstood`{{exec}}
89 | 
90 | -------------------------------------------------------------------------------- /Linux/localhost/grub.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [gnu.org - GNU GRUB Manual](https://www.gnu.org/software/grub/manual/grub/grub.html) 4 | - [wikipedia.org - GRUB](https://www.wikipedia.org/wiki/GNU_GRUB) 5 | - [wikibooks.org - GRUB2](https://ru.wikibooks.org/wiki/Grub_2) 6 |
7 |
Most common scenario to update grub 8 |
 9 |     - edit /etc/default/grub
10 |     - edit script in /etc/grub.d/40_custom
11 |     $ sudo vi /etc/grub.d/40_custom
12 |     $ sudo update-grub
13 |     $ sudo reboot
14 | 
15 |

16 | 17 | Task list: 18 | - Add custom menu to your grub2 config 19 | 20 |
Hints for the task 21 |
22 | Task 1:
23 |   $ look for Lesson info and tips above
24 | 
25 |
26 |
27 |
If You have read all and understood 28 |
29 | `touch IReadAllAndUndnderstood`{{exec}}
30 | 
31 | -------------------------------------------------------------------------------- /Linux/localhost/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Localhost administration", 3 | "description": "Learn how to administer localhost", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground" : "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/10 - Terminal multiplexers [54:00]", 13 | "text": "tmux.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/10 - User management [48:00]", 17 | "text": "users.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/10 - Priveledge escalation with SUDO [42:00]", 21 | "text": "sudo.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/10 - Package management [36:00]", 25 | "text": "app_management.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "5/10 - System management with SYSTEMD [30:00]", 29 | "text": "systemd.md", 30 | "verify": "scripts/check.sh" 31 | },{ 32 | "title": "6/10 - Operating system monitoring [24:00]", 33 | "text": "monitoring.md", 34 | "verify": "scripts/check.sh" 35 | },{ 36 | "title": "7/10 - Viewing and Managing log-files [18:00]", 37 | "text": "logging.md", 38 | "verify": "scripts/check.sh" 39 | },{ 40 | "title": "8/10 - Cron and systemd.timers [12:00]", 41 | "text": "cron.md", 42 | "verify": "scripts/check.sh" 43 | },{ 44 | "title": "9/10 - Working with GRUB2 boot manager [6:00]", 45 | "text": "grub.md", 46 | "verify": "scripts/check.sh" 47 | },{ 48 | "title": "10/10 - Security and Hardening [00:00]", 49 | "text": "security.md", 50 | "verify": "scripts/check.sh" 51 | } 52 | ], 53 | "finish": { 54 | "text": "service/finish.md" 55 | } 56 | }, 57 | "backend": { 58 | "imageid": "ubuntu" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Linux/localhost/logging.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [rsyslog.com - The rocket-fast Syslog Server](https://www.rsyslog.com/) 4 | - [ubuntu.com - Linux Log Files](https://help.ubuntu.com/community/LinuxLogFiles#System_Log) 5 | - [opensuse.org - Query the systemd journal](https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-journalctl.html) 6 | - [fedoraproject.org - Viewing and Managing Log Files](https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/monitoring-and-automation/Viewing_and_Managing_Log_Files/) 7 | - [debian-handbook.info - syslog System Events](https://debian-handbook.info/browse/stable/sect.syslog.html) 8 | 9 | Manual pages: 10 | - `man journalctl`{{exec}} 11 | - `man systemd-journald.service`{{exec}} 12 | - `man rsyslog.conf`{{exec}} 13 | - `man logger`{{exec}} 14 | 15 | Handy stuff: 16 | 17 | - Log collectors: [rsyslog](https://www.rsyslog.com/), [Filebeat](https://www.elastic.co/beats/filebeat), [Fluentd](https://www.fluentd.org/) 18 | - Log processing: [Logstash](https://www.elastic.co/logstash/), [Graylog](https://www.graylog.org/), [Splunk](https://www.splunk.com/) 19 | - Log storage: [ElasticSearch](https://www.elastic.co/), [InfluxDB](https://www.influxdata.com/) 20 | - Log visualizer: [Kibana](https://www.elastic.co/kibana/), [Grafana](https://grafana.com/) 21 | 22 | Task list: 23 | - Write message "Hello World directly to journald log" 24 | - Show latest journald records since 1 minute 25 | - Show total disk usage by journald logs 26 | - Clear journald logs? but save last year 27 | 28 |
Hints for the task 29 |
30 |   $ systemd-cat echo "Hello World!"
31 |   $ journalctl --since "1 minute ago"
32 |   $ journalctl --disk-usage
33 |   $ journalctl --vacuum-time=1years
34 | 
35 |
36 |
37 |
If You have read all and understood 38 |
39 | `touch IReadAllAndUndnderstood`{{exec}}
40 | 
41 | -------------------------------------------------------------------------------- /Linux/localhost/monitoring.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [github.com - System performance tools](https://github.com/sysstat/sysstat) 4 | - [gnu.org - Accounting Utilities Manual](https://www.gnu.org/software/acct/manual/accounting.html) 5 | 6 | Manual pages: 7 | - `man vmstat`{{exec}} 8 | - `man ps`{{exec}} 9 |
10 |
Some useful tools for monitoring 11 |
12 |   System activity:      top :: htop :: atop :: btop
13 |   Virtual Memory:       free :: vmstat :: sar :: sysstat 
14 |   Processes and tasks:  ps :: pidstat
15 |   Input/Output:         iostat :: lsof :: iotop
16 |   User activity:        sa :: lastcomm 
17 |   Explore hardware:     dmesg :: lshw :: lscpu :: lsusb :: lspci :: lsblk
18 | 
19 |

20 | 21 | Task list: 22 | - Install htop into your system and start it 23 | - Explore hardware in different ways 24 | - Explore running processes 25 | 26 |
Hints for the task 27 |
28 | Task 1:
29 |   $ snap install htop
30 |   $ htop
31 | 
32 | Task 2: 33 | $ dmesg 34 | $ lscpu && lsusb && lspci 35 | $ lshw 36 |
37 | Task 3: 38 | $ sudo apt install sysstat 39 | $ pidstat 40 |
41 |
42 |
43 |
If You have read all and understood 44 |
45 | `touch IReadAllAndUndnderstood`{{exec}}
46 | 
47 | -------------------------------------------------------------------------------- /Linux/localhost/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/localhost/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Linux/localhost/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | tmux new\; split -v\; send 'man tmux' C-m\; select-pane -U\; send '# Use Ctrl+B ArrowUp - ArrowDown to choise tmux pane OR press Ctrl+B ? to help' C-m 2 | -------------------------------------------------------------------------------- /Linux/localhost/security.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [suse.com - Security and Hardening Guide](https://documentation.suse.com/sles/15-SP2/html/SLES-all/book-security.html) 4 | - [redhat.com - Security hardening](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/index) 5 | - [github.com - How To Secure A Linux Server](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server) 6 | - [archlinux.org - Security](https://wiki.archlinux.org/title/security#CPU) 7 | - [github.com - Awesome Security](https://github.com/decalage2/awesome-security-hardening) 8 | 9 | Task list: 10 | - Learn how to encrease security in Linux 11 | - Learn different tools like AppArmour and SeLinux 12 |
13 |
If You have read all and understood 14 |
15 | `touch IReadAllAndUndnderstood`{{exec}}
16 | 
17 | -------------------------------------------------------------------------------- /Linux/localhost/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished this scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | - [ubuntu.com - Ubuntu system administration](https://help.ubuntu.com/community/SystemAdministration) 5 | - [redhat.com - RHEL documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9) 6 | - [fedora.org - FL System Administrator’s Guide](https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/) 7 | - [suse.com - SLES Administration Guide](https://documentation.suse.com/sles/15-SP4/html/SLES-all/book-administration.html) 8 | - [debian.org - The Debian Administrator's Handbook](https://debian-handbook.info/browse/stable/) 9 | 10 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/localhost) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/networking)! 11 | -------------------------------------------------------------------------------- /Linux/localhost/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to Linux Localhost administration scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [ubuntu.com - Ubuntu system administration](https://help.ubuntu.com/community/SystemAdministration) 6 | - [redhat.com - RHEL documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9) 7 | - [fedora.org - FL System Administrator’s Guide](https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/) 8 | - [suse.com - SLES Administration Guide](https://documentation.suse.com/sles/15-SP6/html/SLES-all/book-administration.html) 9 | - [debian.org - The Debian Administrator's Handbook](https://debian-handbook.info/browse/stable/) 10 | 11 | Now, lets start! 12 | -------------------------------------------------------------------------------- /Linux/localhost/sudo.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [sudo.ws - A Short Introduction](https://www.sudo.ws/about/intro/) 4 | - [github.com - SUDO project source code](https://github.com/sudo-project/sudo) 5 | - [cheat.sh - SUDO](https://cheat.sh/sudo) 6 | - [digitalocean.com - How To Edit the Sudoers File](https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file) 7 | 8 | Manual pages: 9 | - `man sudoers`{{exec}} 10 |
11 |
Most common scenarios 12 |
13 |   List the current user's sudo(8) privileges.
14 |     $ sudo -l
15 | Begin a shell session as the system's `root` user. 16 | $ sudo -i
17 | Run a command as the superuser 18 | $ sudo less /var/log/syslog
19 | Run a command as another user and/or group 20 | $ sudo --user=user1 --group=group1 id -a
21 | Launch the default shell with superuser privileges without changing the environment 22 | $ sudo --shell 23 |
24 |

25 | 26 | Task list: 27 | - Run `ls -AlF` with superuser priveledges 28 | - Edit /etc/sudoers with visudo 29 | 30 |
Hints for the task 31 |
32 | Task 1:
33 |   $ sudo ls -AlF
34 | 
35 | Task 2: 36 | $ visudo 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Linux/localhost/tmux.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [github.org - TMUX homepage](https://github.com/tmux/tmux/wiki) 4 | - [readthedocs.io - TMUX guide](https://link.org/) 5 | - [github.org - tmux shortcuts & cheatsheet](https://gist.github.com/MohamedAlaa/2961058) 6 | - [opensource.com - Cheatsheet for tmux](https://opensource.com/article/20/7/tmux-cheat-sheet) 7 | - [learnxinyminutes.com - TMUX](https://learnxinyminutes.com/docs/tmux/) 8 | - `screen -h`{{exec}} 9 | - [gnu.org - GNU screen homepage](https://www.gnu.org/software/screen/) 10 | - [gnu.org - GNU screen manual](https://www.gnu.org/software/screen/manual/screen.html) 11 | 12 | Interesting video tutorials: 13 | - [youtube.com - How to use GNU SCREEN](https://www.youtube.com/watch?v=I4xVn6Io5Nw) 14 |
15 |
Tmux commands 16 |
17 |   tmux — Start tmux
18 |   tmux new -s <name> — Start tmux with <name>
19 |   tmux ls  — Shows the list of sessions
20 |   tmux a # — Attach the detached-session
21 |   tmux a -t <name> — Attach the detached-session to <name>
22 |   tmux kill-session –t <name>  — Kill the session <name>
23 |   tmux kill-server — Kill the tmux server
24 | 
25 |
26 |
GNU Screen commands 27 |
28 |   screen — Start screen
29 |   screen -S  — Starts a named session
30 |   screen -r <name> — Reattach to a screen (optionally by name)
31 |   screen -ls | --list — Returns a list of session ids
32 | 
33 |

34 | 35 | Task list: 36 | - Create new window in tmux then split it horizontaly and verticaly, show numbers of panes, then switch between them 37 | - Create new window in screen then split it horizontaly and verticaly, witch between them 38 | 39 |
Hints for the task 40 |
41 | Task 1:
42 |   In tmux type:
43 |     Ctrl-b % - split horizontal 
44 |     Ctrl-b " - split vertical 
45 |     Ctrl-b q - show numbers of panes
46 |     Ctrl-b q 2 - switch to 2 pane
47 |     Ctrl-b d - detach session
48 | 
49 | Task 2: 50 | In screen type: 51 | Ctrl-a | - split vertical 52 | Ctrl-a c - create new window in pane 53 | Ctrl-a S - split horizontal 54 | Ctrl-a c 2 - create new window in pane 55 | Ctrl-a Tab - switch between panes 56 | Ctrl-a d - detach session 57 |
58 |
59 |
60 |
If You have read all and understood 61 |
62 | `touch IReadAllAndUndnderstood`{{exec}}
63 | 
64 | -------------------------------------------------------------------------------- /Linux/localhost/users.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [ubuntu.com - User Management](https://ubuntu.com/server/docs/security-users) 4 | - [tutorialspoint.com - Linux Admin - User Management](https://www.tutorialspoint.com/linux_admin/linux_admin_user_management.htm) 5 | - [makeuseof.com - User Management in Linux](https://www.makeuseof.com/user-management-linux-guide/) 6 | 7 | Manual pages: 8 | - `man useradd`{{exec}} 9 |
10 |
Most common algorythm of user creation 11 |
12 |     $ groupadd some_group
13 |     $ useradd -m -g some_group -G another_group,some_group2 user1
14 |     $ passwd user1
15 | 
16 |

17 | 18 | Task list: 19 | - Create 'random' group 20 | - Create some user and add it to previously created group 21 | 22 |
Hints for the task 23 |
24 | Task 1:
25 |   $ groupadd random
26 | 
27 | Task 2: 28 | $ useradd -m -g random -G wheel user1 29 | $ passwd user1 30 |
31 |
32 |
33 |
If You have read all and understood 34 |
35 | `touch IReadAllAndUndnderstood`{{exec}}
36 | 
37 | -------------------------------------------------------------------------------- /Linux/networking/activity.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [wikipedia.org - Iproute2](https://en.wikipedia.org/wiki/Iproute2) 4 | - [man7.org - SS(8)](https://man7.org/linux/man-pages/man8/ss.8.html) 5 | 6 | Manual pages: 7 | - `man ss`{{exec}} 8 |
9 |
'ss' state filter 10 |
11 |   All standard TCP states:
12 | established, listening, closed 13 | syn-sent, syn-recv, 14 | fin-wait-1, fin-wait-2, time-wait, close-wait, 15 | last-ack, closing
16 | all - for all the states 17 | connected - all the states except for listening and closed 18 | synchronized - all the connected states except for syn-sent 19 | bucket - states, which are maintained as minisockets, i.e. time-wait and syn-recv 20 | big - opposite to bucket 21 |
22 | Example: 23 | $ ss state listening 24 | $ ss -tu state established 25 |
26 |
27 |
'ss' expressions 28 |
29 |   {dst|src} [=] HOST   - Test if the destination or source matches HOST.
30 |   {dport|sport} [OP] [FAMILY:]:PORT - Compare the destination or source port to PORT. OP can be any of "<", "<=", "=", "!=", ">=" and ">". 
31 |   dev [=|!=] DEVICE    - DEVICE can be a device name or the index of the interface.
32 |   fwmark [=|!=] MASK   - Matches based on the fwmark value for the connection. 
33 |   cgroup [=|!=] PATH   - Match if the connection is part of a cgroup at the given path.
34 |   autobound            - Match if the port or path of the source address was automatically allocated.
35 |   
36 | Example: 37 | $ ss -o state established '( dport = :ssh or sport = :ssh )' 38 |
39 |
40 |
Contents of /proc/net directory 41 |
42 |   arp        — Lists the kernel's ARP table. This file is particularly useful for connecting a hardware address to an IP address on a system.
43 |   atm/ directory — The files within this directory contain Asynchronous Transfer Mode (ATM) settings and statistics. This directory is primarily used with ATM networking and ADSL cards.
44 |   dev        — Lists the various network devices configured on the system, complete with transmit and receive statistics. This file displays the number of bytes each interface has sent and received, the number of packets inbound and outbound, the number of errors seen, the number of packets dropped, and more.
45 |   dev_mcast  — Lists Layer2 multicast groups on which each device is listening.
46 |   igmp       — Lists the IP multicast addresses which this system joined.
47 |   ip_conntrack — Lists tracked network connections for machines that are forwarding IP connections.
48 |   ip_tables_names — Lists the types of iptables in use. This file is only present if iptables is active on the system and contains one or more of the following values: filter, mangle, or nat.
49 |   ip_mr_cache — Lists the multicast routing cache.
50 |   ip_mr_vif  — Lists multicast virtual interfaces.
51 |   netstat    — Contains a broad yet detailed collection of networking statistics, including TCP timeouts, SYN cookies sent and received, and much more.
52 |   psched     — Lists global packet scheduler parameters.
53 |   raw        — Lists raw device statistics.
54 |   route      — Lists the kernel's routing table.
55 |   rt_cache   — Contains the current routing cache.
56 |   snmp       — List of Simple Network Management Protocol (SNMP) data for various networking protocols in use.
57 |   sockstat   — Provides socket statistics.
58 |   tcp        — Contains detailed TCP socket information.
59 |   tr_rif     — Lists the token ring RIF routing table.
60 |   udp        — Contains detailed UDP socket information.
61 |   unix       — Lists UNIX domain sockets currently in use.
62 |   wireless   — Lists wireless interface data.
63 | 
64 |
65 |
66 | 67 | Task list: 68 | - Get all sockets in listen state. 69 | - Get all establishet tcp connetctions 70 | 71 |
Hints for the task 72 |
73 | Task 1:
74 |   $ ss state listening
75 | 
76 | Task 2: 77 | $ ss -tu state established 78 |
79 |
80 |
81 |
If You have read all and understood 82 |
83 | `touch IReadAllAndUndnderstood`{{exec}}
84 | 
85 | -------------------------------------------------------------------------------- /Linux/networking/dynamic_route.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [frrouting.org - FRRouting User Guide](https://docs.frrouting.org/en/latest/) 4 | - [github.com - FRR source code](https://github.com/FRRouting/frr) 5 | - [network.cz - The BIRD Internet Routing Daemon](https://bird.network.cz/) 6 | - [github.com - BIRD source code](https://github.com/CZ-NIC/bird) 7 | - [openbgpd.org - OpenBGPD](https://www.openbgpd.org/) 8 | - [github.com - Dynamips](https://github.com/GNS3/dynamips) 9 | - [eve-ng.net - EVE NG Documentation](https://www.eve-ng.net/index.php/documentation/) 10 |
11 |
Lesson info and tips 12 |
13 |   - FRR is a fully featured, high performance, free software IP routing suite. It implements all standard routing protocols such as BGP, RIP, OSPF, IS-IS and more
14 |   - The BIRD project aims to develop a fully functional dynamic IP routing daemon primarily targeted on (but not limited to) Linux, FreeBSD and other UNIX-like systems and distributed under the GNU General Public License.
15 | 
16 |
17 |
18 |
OSPF References 19 |
20 |   - wikipedia.org - Open Shortest Path First
21 |   - ietf.org - rfc2328 OSPFv2
22 |   - ietf.org - rfc5340 OSPFv3 for IPv6
23 |   - frrouting.org - OSPFv2
24 |   - frrouting.org - OSPFv3
25 |   - bird.network.cz - OSPF
26 |   - openbsd.org - ospfd(8)
27 | 
28 |
29 |
BGP References 30 |
31 |   - wikipedia.org - Border Gateway Protocol
32 |   - ietf.org - rfc4271 A Border Gateway Protocol 4 (BGP-4)
33 |   - frrouting.org - BGP
34 |   - bird.network.cz - BGP
35 |   - openbgpd.org - OpenBGPd Manual pages
36 | 
37 |

38 | 39 | Task list: 40 | - Install FRR daemon at the 1 node 41 | - Install BIRD daemon at the 2 node 42 | - Try to connect this daemons via RIP, OSPF and BGP 43 | 44 |
Hints for the task 45 |
46 | Task 1:
47 | Look at FRR basics
48 | and BIRD examples
49 | 
50 |
51 |
52 |
If You have read all and understood 53 |
54 | `touch IReadAllAndUndnderstood`{{exec}}
55 | 
56 | -------------------------------------------------------------------------------- /Linux/networking/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Linux networking practice", 3 | "description": "Practice with linux networking", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground": "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/8 'ip' and 'ethtool' utilities [52:30]", 13 | "text": "ip_ethtool.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/8 systemd-networkd — Network manager [45:00]", 17 | "text": "networkd.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/8 Configuring network with NetPlan [37:30]", 21 | "text": "netplan.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/8 Firewall, NAT and packet mangling [30:00]", 25 | "text": "netfilter.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "5/8 Monitoring network activity [22:30]", 29 | "text": "activity.md", 30 | "verify": "scripts/check.sh" 31 | },{ 32 | "title": "6/8 Analyze network traffic [15:00]", 33 | "text": "traffic.md", 34 | "verify": "scripts/check.sh" 35 | },{ 36 | "title": "7/8 Dynamic routing [07:30]", 37 | "text": "dynamic_route.md", 38 | "verify": "scripts/check.sh" 39 | },{ 40 | "title": "8/8 Tuning QoS [00:00]", 41 | "text": "qos.md", 42 | "verify": "scripts/check.sh" 43 | } 44 | ], 45 | "finish": { 46 | "text": "service/finish.md" 47 | } 48 | }, 49 | "backend": { 50 | "imageid": "ubuntu" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Linux/networking/ip_ethtool.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [github.com - 'ip' source code](https://github.com/shemminger/iproute2/tree/main/ip) 4 | - [redhat.com - 'ip' cheatsheet](https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf) 5 | - [baturin.org - Task-centered iproute2 user guide](https://baturin.org/docs/iproute2/) 6 | - [kernel.org - 'ethtool' Controlling network drivers and hardware](http://www.kernel.org/pub/software/network/ethtool/) 7 | 8 | Manual pages: 9 | - `man ip`{{exec}} 10 | - `man ethtool`{{exec}} 11 |
12 |
'ip' objects summary 13 |
14 |   address    - protocol (IP or IPv6) address on a device.
15 |   addrlabel  - label configuration for protocol address selection.
16 |   l2tp       - tunnel ethernet over IP (L2TPv3).
17 |   link       - network device.
18 |   maddress   - multicast address.
19 |   monitor    - watch for netlink messages.
20 |   mptcp      - manage MPTCP path manager.
21 |   mroute     - multicast routing cache entry.
22 |   mrule      - rule in multicast routing policy database.
23 |   neighbour  - manage ARP or NDISC cache entries.
24 |   netns      - manage network namespaces.
25 |   ntable     - manage the neighbor cache's operation.
26 |   route      - routing table entry.
27 |   rule       - rule in routing policy database.
28 |   tcp_metrics/tcpmetrics - manage TCP Metrics.
29 |   token      - manage tokenized interface identifiers.
30 |   tunnel     - tunnel over IP.
31 |   tuntap     - manage TUN/TAP devices.
32 |   vrf        - manage virtual routing and forwarding devices.
33 |   xfrm       - manage IPSec policies.
34 | 
35 |
36 |
'ethtool' - cheatsheet 37 |
38 |   ethtool -S <interface>     - statistics for the selected interface
39 |   ethotool -P <interface>    - interface permanent address
40 |   ethtool -s <interface> [ speed %d ]        - set interface speed
41 |   ethtool -s <interface> [ autoneg on|off ]  - set interface autonegotiation
42 |   ethtool -S <interface> | grep error        - get interface errors
43 |   ethtool <interface>        - current settings
44 |   ethtool --driver <interface>               - driver information
45 |   ethtool --show-features <interface>        - all supported features
46 |   ethtool --statistics <interface>           - network usage statistics
47 |   ethtool --identify <interface> 10          - blink one or more LEDs on an interface for 10 seconds
48 |   ethtool -s eth0 speed 10|100|1000 duplex half|full autoneg on|off - link speed, duplex mode, and parameter auto-negotiation
49 | 
50 |

51 | 52 | Task list: 53 | - Get list of namespaces in the system 54 | - Watch interface MAC-address 55 | 56 |
Hints for the task 57 |
58 | Task 1:
59 |   $ ip netns list
60 | 
61 | Task 2: 62 | $ ethtool -P <interface> 63 |
64 |
65 |
66 |
If You have read all and understood 67 |
68 | `touch IReadAllAndUndnderstood`{{exec}}
69 | 
70 | -------------------------------------------------------------------------------- /Linux/networking/netfilter.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [netfilter.org - Main page](https://www.netfilter.org/) 4 | - [netfilter.org - Documentation](https://www.netfilter.org/documentation/index.html) 5 | - [frozentux.net - IPtables tutorial](https://www.frozentux.net/iptables-tutorial/iptables-tutorial.html) 6 | - [ubuntu.com - Introduction to UFW](https://help.ubuntu.com/community/UFW) 7 | 8 | Manual pages: 9 | - `man iptables`{{exec}} 10 | - `man ufw`{{exec}} 11 |
12 |
IPtables tables and chains 13 |
 14 |   RAW - Used to set NOTRACK packet mark
 15 |     - PREROUTING - Handle packets before the connection tracking takes place.
 16 |     - OUTPUT - Is the same when localhost is the source of packer.
 17 |   FILTER - Used for packet filtering.
 18 |     - INPUT    –  Chain for packets coming to the local server.
 19 |     - OUTPUT   – Chain for packets generated locally and going out of the local server.
 20 |     - FORWARD  – Chain for or packets routed through the local server.
 21 |   NAT - Used for address translation.
 22 |     - PREROUTING   – Alters packets before routing.
 23 |     - POSTROUTING  – Alters packets after routing.
 24 |     - OUTPUT       – NAT for locally generated packets on the firewall
 25 |   MANGLE - Can be used for special-purpose processing of packets i.e. QoS, VPN, etc.
 26 |     - PREROUTING
 27 |     - OUTPUT
 28 |     - FORWARD
 29 |     - INPUT
 30 |     - POSTROUTING
 31 | 
32 |
33 |
Iptables targets and jumps (-j <TARGET>) 34 |
  
 35 |   ACCEPT    - the rule is accepted and will not continue traversing the current chain or any other ones in the same table.
 36 |   CLASSIFY  - used to classify packets in such a way that can be used by a couple of different qdiscs (Queue Disciplines).
 37 |   CLUSTERIP - used to create simple clusters of nodes answering to the same IP and MAC address in a round robin fashion.
 38 |   CONNMARK  - used to set a mark on a whole connection, much the same way as the MARK target does.
 39 |   CONNSECMARK - sets a SELinux security context mark to or from a packet mark.
 40 |   DNAT      - used to do Destination Network Address Translation, which means that it is used to rewrite the Destination IP address of a packet.
 41 |   DROP      - drops packets dead and will not carry out any further processing.
 42 |   DSCP      - changes the DSCP(Differentiated Services Field) marks inside a packet.
 43 |   ECN       - ECN target can be used to reset the ECN bits from the IPv4 header, or to put it correctly, reset them to 0 at least.
 44 |   LOG       - logging detailed information about packets.
 45 |   MARK      - set Netfilter mark values that are associated with specific packets.
 46 |   MASQUERADE - used basically the same as the SNAT target, but it does not require any --to-source option.
 47 |   MIRROR    - is an experimental and demonstration target only, and you are warned against using it, since it may result in really bad loops hence, among other things, resulting in serious Denial of Service.
 48 |   NETMAP    - new implementation of the SNAT and DNAT targets where the host part of the IP address isn't changed.
 49 |   NFQUEUE   - used much the same way as the QUEUE target, and is basically an extension of it.
 50 |   NOTRACK   - used to turn off connection tracking for all packets matching this rule.
 51 |   QUEUE     - used to queue packets to User-land programs and applications.
 52 |   REDIRECT  - used to redirect packets and streams to the machine itself.
 53 |   REJECT    - works basically the same as the DROP target, but it also sends back an error message to the host sending the packet that was blocked.
 54 |   RETURN    - will cause the current packet to stop traveling through the chain where it hit the rule.
 55 |   SAME      - works almost in the same fashion as the SNAT target, but it still differs.
 56 |   SECMARK   - used to set a security context mark on a single packet, as defined by SELinux and security systems.
 57 |   SNAT      - used to do Source Network Address Translation, which means that this target will rewrite the Source IP address in the IP header of the packet.
 58 |   TCPMSS    - can be used to alter the MSS (Maximum Segment Size) value of TCP SYN packets that the firewall sees.
 59 |   TOS       - used to set the Type of Service field within the IP header.
 60 |   TTL       - used to modify the Time To Live field in the IP header.
 61 |   ULOG      - used to provide user-space logging of matching packets.
 62 | 
63 |
64 |
UFW cheatsheet 65 |
 66 |    enable        - enables the firewall
 67 |    disable       - disables the firewall
 68 |    default ARG   - set default policy
 69 |    logging LEVEL - set logging to LEVEL
 70 |    allow ARGS    - add allow rule
 71 |    deny ARGS     - add deny rule
 72 |    reject ARGS   - add reject rule
 73 |    limit ARGS    - add limit rule
 74 |    delete RULE|NUM - delete RULE
 75 |    insert NUM RULE - insert RULE at NUM
 76 |    prepend RULE  - prepend RULE
 77 |    route RULE    - add route RULE
 78 |    route delete RULE|NUM - delete route RULE
 79 |    route insert NUM RULE - insert route RULE at NUM
 80 |    reload        - reload firewall
 81 |    reset         - reset firewall
 82 |    status        - show firewall status
 83 |    status numbered - show firewall status as numbered list of RULES
 84 |    status verbose  - show verbose firewall status
 85 |    show ARG      - show firewall report
 86 |    version       - display version information
87 | Application profile commands 88 | app list - list application profiles 89 | app info PROFILE - show information on PROFILE 90 | app update PROFILE - update PROFILE 91 | app default ARG - set default application policy 92 |
93 |

94 | 95 | Task list: 96 | - Determine what ttl the packet will have after ping 1.1.1.1 97 | - Change the TTL of the incoming ICMP packet from 1.1.1.1 to 77 98 | 99 |
Hints for the task 100 |
101 | Task 1:
102 |   $ ping 1.1.1.1
103 |   PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
104 |   64 bytes from 1.1.1.1: icmp_seq=1 ttl=51 time=1.48 ms
105 | 
106 | Task 2: 107 | $ sudo iptables -t mangle -A PREROUTING -p icmp -j TTL --ttl-set 77 108 | $ ping 1.1.1.1 109 | PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. 110 | 64 bytes from 1.1.1.1: icmp_seq=1 ttl=77 time=1.56 ms 111 |
112 |
113 |
114 |
If You have read all and understood 115 |
116 | `touch IReadAllAndUndnderstood`{{exec}}
117 | 
118 | -------------------------------------------------------------------------------- /Linux/networking/netplan.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [ubuntu.com - Canonical Netplan](https://netplan.io/) 4 | - [readthedocs.io - NetPlan YAML config specification](https://netplan.readthedocs.io/en/stable/netplan-yaml/#properties-for-device-type-bridges) 5 | - [linuxconfig.org - Netplan network configuration tutorial](https://linuxconfig.org/netplan-network-configuration-tutorial-for-beginners) 6 | - [vitux.com - Networking on Ubuntu with Netplan](https://vitux.com/how-to-configure-networking-with-netplan-on-ubuntu/) 7 | 8 | Manual pages: 9 | - `man netplan`{{exec}} 10 |
11 |
'netplan' tool commands 12 |
13 |   help   - Show this help message
14 |   apply  - Apply current netplan config to running system
15 |   generate - Generate backend specific configuration files from /etc/netplan/*.yaml
16 |   info   - Show current netplan version and available features
17 |   ip     - Retrieve IP information from the system
18 |   try    - Try to apply a new netplan config to running system, with automatic rollback
19 | 
20 |

21 | 22 | Task list: 23 | - Create dummy interface with 'ip' utility 24 | - Assign address 192.168.50.12/24 to it and default gw 192.168.50.1/24 25 | 26 |
Hints for the task 27 |
28 | Task 1:
29 |   $ ip link add dummy0 type dummy
30 |   $ sudo ip link set dummy0 up
31 | 
32 | Task 2: 33 | $ vi /etc/netplan/10-dummy0.yaml 34 | network: 35 | version: 2 36 | ethernets: 37 | dummy0: 38 | addresses: 39 | - 192.168.50.12/24 40 | nameservers: 41 | search: [mydomain.local] 42 | addresses: [192.168.50.1] 43 | routes: 44 | - to: default 45 | via: 192.168.50.1 46 | $ sudo netplan generate 47 | $ cat /run/systemd/network/10-netplan-dummy0.network 48 |
49 |
50 |
51 |
If You have read all and understood 52 |
53 | `touch IReadAllAndUndnderstood`{{exec}}
54 | 
55 | -------------------------------------------------------------------------------- /Linux/networking/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/networking/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Linux/networking/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | # If You want to read manual pages, run tmux, press Ctrl+b " (double quote) or % 2 | # Ctrl+b then DOWN/UP, to navigate between panes (Ctrl+b Ctrl+DOWN/UP to resize) 3 | # Ctrl-? for Shortcuts, or Ctrl-B :list-commands 4 | # Open manual in one pane and practice in other! (Ctrl+b x to close pane) 5 | -------------------------------------------------------------------------------- /Linux/networking/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished this scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | - [kernel.org - Linux Networking](https://www.kernel.org/doc/html/latest/networking/index.html) 5 | - [kernelnewbies.org - Linux Protocol Stack](https://kernelnewbies.org/Documents/LinuxIPNetworking) 6 | - [ubuntu.com - Network configuration](https://ubuntu.com/server/docs/network-configuration) 7 | - [systemd.io - Predictable Network Interface Names](https://systemd.io/PREDICTABLE_INTERFACE_NAMES/) 8 | - `man systemd.network`{{exec}} 9 | 10 | And watch some videos: 11 | - [youtube.com - Advanced Linux Kernel Networking Monitoring](https://www.youtube.com/watch?v=RzszHq0ZSAk) 12 | - [youtube.com - How Linux processes your network packet](https://www.youtube.com/watch?v=3Ij0aZRsw9w) 13 | - [youtube.com - Kernel-bypass techniques for high-speed network packet processing](https://www.youtube.com/watch?v=MpjlWt7fvrw) 14 | - [youtube.com - Life of a Packet](https://www.youtube.com/watch?v=0Omvgd7Hg1I) 15 | - [youtube.com - Network Performance in the Linux Kernel](https://www.youtube.com/watch?v=g4w3ydS62S0) 16 | - [youtube.com - Linux Networking - eBPF, XDP, DPDK, VPP](https://www.youtube.com/watch?v=hO2tlxURXJ0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/networking) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/storage)! 19 | -------------------------------------------------------------------------------- /Linux/networking/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to Linux Networking scenario! 2 | 3 | Read some useful articles before: 4 | - [kernel.org - Linux Networking](https://www.kernel.org/doc/html/latest/networking/index.html) 5 | - [kernelnewbies.org - Linux Protocol Stack](https://kernelnewbies.org/Documents/LinuxIPNetworking) 6 | - [ubuntu.com - Network configuration](https://ubuntu.com/server/docs/network-configuration) 7 | - [systemd.io - Predictable Network Interface Names](https://systemd.io/PREDICTABLE_INTERFACE_NAMES/) 8 | - `man systemd.network`{{exec}} 9 | 10 | And watch some videos: 11 | - [youtube.com - Advanced Linux Kernel Networking Monitoring](https://www.youtube.com/watch?v=RzszHq0ZSAk) 12 | - [youtube.com - How Linux processes your network packet](https://www.youtube.com/watch?v=3Ij0aZRsw9w) 13 | - [youtube.com - Kernel-bypass techniques for high-speed network packet processing](https://www.youtube.com/watch?v=MpjlWt7fvrw) 14 | - [youtube.com - Life of a Packet](https://www.youtube.com/watch?v=0Omvgd7Hg1I) 15 | - [youtube.com - Network Performance in the Linux Kernel](https://www.youtube.com/watch?v=g4w3ydS62S0) 16 | - [youtube.com - Linux Networking - eBPF, XDP, DPDK, VPP](https://www.youtube.com/watch?v=hO2tlxURXJ0) 17 | 18 | Now, lets start! 19 | -------------------------------------------------------------------------------- /Linux/networking/traffic.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [tcpdump.org - Main page](https://www.tcpdump.org/) 4 | - [github.com - 'tcpdump' source code](https://github.com/the-tcpdump-group/libpcap) 5 | - [gist.github.com - 'tcpdump' cheapsheet](https://gist.github.com/jforge/27962c52223ea9b8003b22b8189d93fb) 6 | - [packetlife.net - 'tcpdump' cheapsheet](https://packetlife.net/media/library/12/tcpdump.pdf) 7 | - [tcpdump.org - tcpdump(1) man page](https://www.tcpdump.org/manpages/tcpdump.1.html) 8 | - [nmap.org - Main page](https://nmap.org/) 9 | - [nmap.org - Documentation](https://nmap.org/docs.html) 10 | - [tutorialspoint.com - 'nmap' cheatsheet](https://www.tutorialspoint.com/nmap-cheat-sheet) 11 | 12 | Manual pages: 13 | - `man tcpdump`{{exec}} 14 | - `apt install nmap -y && man nmap`{{exec}} 15 | - `nmap --script-help all | less`{{exec}} 16 | 17 | Task list: 18 | - Explote what traffic goes onto your host 19 | - Scan localhost for open ports 20 | 21 |
Hints for the task 22 |
23 | Task 1:
24 |   $ tcpdump -i enp1s0
25 | 
26 | Task 2: 27 | $ nmap localhost 28 |
29 |
30 |
31 |
If You have read all and understood 32 |
33 | `touch IReadAllAndUndnderstood`{{exec}}
34 | 
35 | -------------------------------------------------------------------------------- /Linux/services/dhcp_ntp_tftp.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [readthedocs.io - Kea Administrator Reference Manual](https://kea.readthedocs.io/en/latest/) 4 | - [isc.org - Kea DHCP](https://www.isc.org/kea/) 5 | - [ntpsec.org - Network Time Protocol (NTP) Daemon](https://docs.ntpsec.org/latest/ntpd.html) 6 | - [redhat.com - Configuring NTP Using ntpd](https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_ntpd) 7 | - [github.com - NetKit TFTPd](https://github.com/ClausKlein/netkit-tftp) 8 | 9 | Manual pages: 10 | - `man xinetd`{{exec}} 11 | - `man systemd-timesyncd`{{exec}} 12 |
13 |
Kea Software 14 |
15 |   keactrl    — This tool starts, stops, reconfigures, and reports the status of the Kea servers.
16 |   kea-dhcp4  — The DHCPv4 server process. This process responds to DHCPv4 queries from clients.
17 |   kea-dhcp6  — The DHCPv6 server process. This process responds to DHCPv6 queries from clients.
18 |   kea-dhcp-ddns — The DHCP Dynamic DNS process. This process acts as an intermediary between the DHCP servers and external DNS servers.
19 |   kea-admin  — This is a useful tool for database backend maintenance (creating a new database, checking versions, upgrading, etc.).
20 |   kea-lfc    — This process removes redundant information from the files used to provide persistent storage for the memfile database backend.
21 |   kea-ctrl-agent — The Kea Control Agent (CA) is a daemon that exposes a RESTful control interface for managing Kea servers.
22 |   kea-netconf  — kea-netconf is an agent that provides a YANG/NETCONF interface for configuring Kea.
23 |   kea-shell    — This simple text client uses the REST interface to connect to the Kea Control Agent.
24 |   perfdhcp     — This is a DHCP benchmarking tool which simulates multiple clients to test both DHCPv4 and DHCPv6 server performance.
25 | 
26 |
27 |
NTPd manual pages 28 |
29 |   ntp.conf(5)  - ntpd Configuration File
30 |   ntp.keys(5)  - NTP symmetric key file format
31 |   ntpd(8)      - Network Time Protocol (NTP) daemon
32 |   ntpdig(1)    - Simple Network Time Protocol (SNTP) client
33 |   ntpfrob(8)   - frob the local clock hardware
34 |   ntpkeygen(8) - generate public and private keys
35 |   ntpleapfetch(8) - fetch and manage leap-offset file
36 |   ntploggps(1)   - log gpsd data for use by ntpviz
37 |   ntplogtemp(1)  - log system temperature data for use by ntpviz
38 |   ntpmon(1)      - real-time NTP status monitor
39 |   ntpq(1)      - standard NTP query program
40 |   ntpsnmp(1)   - an AgentX Simple Network Management Protocol sub-agent [experimental]
41 |   ntpsweep(1)  - print information about given NTP servers
42 |   ntptime(8)   - read and set kernel time variables
43 |   ntptrace(1)  - trace a chain of NTP servers back to the primary source
44 |   ntpviz(1)    - make offset, jitter, and other plots from logfiles
45 |   ntpwait(8)   - wait until ntpd is in synchronized state
46 | 
47 |
48 |
Configuring the 'tftpd' with 'xinetd' 49 |
50 | # in /etc/xinetd.d/tftp
51 | service tftp
52 | {
53 | 	socket_type   = dgram
54 | 	protocol      = udp
55 | 	wait          = yes
56 | 	user          = root
57 | 	server        = /usr/sbin/in.tftpd
58 | 	server_args   = -s /tftpboot
59 | 	disable       = no
60 | 	per_source    = 11
61 | 	cps           = 100 2
62 | 	flags         = IPv4
63 | }
64 | # systemctl restart xinetd
65 | 
66 |
67 |
68 | 69 | Task list: 70 | - Configure 'tftp' server on your system 71 | - Configure 'ntp' server 72 | - Install and configure 'dhcp' server with 042 and 252 options set 73 | 74 |
If You have read all and understood 75 |
76 | `touch IReadAllAndUndnderstood`{{exec}}
77 | 
78 | -------------------------------------------------------------------------------- /Linux/services/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Most popular enterprice services", 3 | "description": "Most popular services and applications", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground": "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/8 DNS server [53:00]", 13 | "text": "dns.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/8 DHCP, NTP and TFTP [46:00]", 17 | "text": "dhcp_ntp_tftp.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/8 LDAP and Diameter [39:00]", 21 | "text": "ldap_kerberos.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/8 NFS, Samba [32:00]", 25 | "text": "nfs_samba.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "5/8 Web server or Load Balancer [25:00]", 29 | "text": "web_lb.md", 30 | "verify": "scripts/check.sh" 31 | },{ 32 | "title": "6/8 PostgreSQL, MariaDB [18:00]", 33 | "text": "postgresql_mariadb.md", 34 | "verify": "scripts/check.sh" 35 | },{ 36 | "title": "7/8 SSH and Virtual Private Networks [11:00]", 37 | "text": "ssh_vpn.md", 38 | "verify": "scripts/check.sh" 39 | },{ 40 | "title": "8/8 Voice over IP [00:00]", 41 | "text": "voip.md", 42 | "verify": "scripts/check.sh" 43 | } 44 | ], 45 | "finish": { 46 | "text": "service/finish.md" 47 | } 48 | }, 49 | "backend": { 50 | "imageid": "kubernetes-kubeadm-2nodes" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Linux/services/ldap_kerberos.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [freeipa.org - FreeIPA - Identity, Policy, Audit](https://www.freeipa.org/) 4 | - [port389.org - 389 Directory Server Documentation](https://www.port389.org/docs/389ds/documentation.html) 5 | - [openldap.org - OpenLDAP oficial site](https://www.openldap.org/) 6 | - [sssd.io - Client for Enterprise Identity Management](https://sssd.io/) 7 | - [mit.edu - Kerberos: The Network Authentication Protocol](https://web.mit.edu/kerberos/) 8 | - [github.com - Heimdal wiki](https://github.com/heimdal/heimdal/wiki) 9 | - [opensuse.org - Network authentication with Kerberos](https://doc.opensuse.org/documentation/leap/security/html/book-security/cha-security-kerberos.html) 10 | - [redhat.com - Configuring authentication and authorization in RHEL](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_authentication_and_authorization_in_rhel/index) 11 | - [wikipedia.org - Diameter](https://en.wikipedia.org/wiki/Diameter_(protocol)) 12 | - [github.com - freeDiameter](https://github.com/freeDiameter/freeDiameter) 13 |
14 |
LDAP RFC`s 15 |
16 |   RFC 4510 — Lightweight Directory Access Protocol (LDAP): Technical Specification Roadmap (obsoletes RFC 3377)
17 |   RFC 4511 — Lightweight Directory Access Protocol (LDAP): The Protocol
18 |   RFC 4512 — Lightweight Directory Access Protocol (LDAP): Directory Information Models
19 |   RFC 4513 — Lightweight Directory Access Protocol (LDAP): Authentication Methods and Security Mechanisms
20 |   RFC 4514 — Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names
21 |   RFC 4515 — Lightweight Directory Access Protocol (LDAP): String Representation of Search Filters
22 |   RFC 4516 — Lightweight Directory Access Protocol (LDAP): Uniform Resource Locator
23 |   RFC 4517 — Lightweight Directory Access Protocol (LDAP): Syntaxes and Matching Rules
24 |   RFC 4518 — Lightweight Directory Access Protocol (LDAP): Internationalized String Preparation
25 |   RFC 4519 — Lightweight Directory Access Protocol (LDAP): Schema for User Applications
26 |   RFC 4520 (aka BCP 64) — Internet Assigned Numbers Authority (IANA) Considerations for the Lightweight Directory Access Protocol (LDAP) (obsoletes RFC 3383)
27 |   RFC 4521 (aka BCP 118) — Considerations for Lightweight Directory Access Protocol (LDAP): Extension
28 | 
29 |
30 |
Diameter RFC`s 31 |
32 |   RFC 6733 — Diameter Base Protocol.
33 |   RFC 3589 — Diameter Command Codes for Third Generation Partnership Project (3GPP) Release 5.		
34 |   RFC 4004 — Diameter Mobile IPv4 Application.	
35 |   RFC 4072 — Diameter Extensible Authentication Protocol (EAP) Application.
36 |   RFC 4740 — Diameter Session Initiation Protocol (SIP) Application. M.
37 |   RFC 5224 — Diameter Policy Processing Application.
38 |   RFC 5431 — Diameter ITU-T Rw Policy Enforcement Interface Application.
39 |   RFC 5447 — Diameter Mobile IPv6: Support for Network Access Server to Diameter Server Interaction.
40 |   RFC 5516 — Diameter Command Code Registration for the Third Generation Partnership Project (3GPP) Evolved Packet System (EPS).
41 |   RFC 5624 — Quality of Service Parameters for Usage with Diameter.
42 |   RFC 6737 — The Diameter Capabilities Update Application.
43 |   RFC 7155 — Diameter Network Access Server Application.
44 |   RFC 8506 — Diameter Credit-Control Application.
45 | 
46 |
47 |
48 | 49 | Task list: 50 | 51 | - Read ALL documentation on the links above 52 | - Practice installing and configuring LDAP services 53 | - Practice installing and configuring Kerberos services 54 | - Practice installing and configuring freeDiameter 55 | 56 |
If You have read all and understood 57 |
58 | `touch IReadAllAndUndnderstood`{{exec}}
59 | 
60 | -------------------------------------------------------------------------------- /Linux/services/postgresql_mariadb.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | MariaDB: 4 | - [digitalocean.com - How To Install MariaDB on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-ubuntu-22-04) 5 | - [mariadb.com - Training & Tutorials](https://mariadb.com/kb/en/training-tutorials/) 6 | - [mariadb.com - MariaDB Administration](https://mariadb.com/kb/en/mariadb-administration/) 7 | - [mariadb.com - SQL Statements](https://mariadb.com/kb/en/sql-statements/) 8 | 9 | PostgreSQL: 10 | - [digitalocean.com - How To Install PostgreSQL on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-22-04-quickstart) 11 | - [postgresql.org - Documentation](https://www.postgresql.org/docs/) 12 | - [postgresql.org - SQL Commands](https://www.postgresql.org/docs/current/sql-commands.html) 13 | - [postgresql.org - Wiki:Administration](https://wiki.postgresql.org/wiki/Category:Administration) 14 | 15 | Interesting video tutorials: 16 | - [youtube.com - MySQL Administration](https://www.youtube.com/playlist?list=PLPAVdwmqFr64vyY3u28Is_cPcuxvzXerQ) 17 | - [youtube.com - PostgreSQL Administration](https://www.youtube.com/playlist?list=PLwxrtuGg5dNGv4jvDY3TEddn2HIn4-uF9) 18 |
19 | 20 | Task list: 21 | - Read ALL documentation on the links above 22 | - Install MariaDB, create new user, database and empty table. 23 | - Install PostgreSQL, create new user, database and empty table. 24 | 25 |
Hints for the task 26 |
27 | Task 1:
28 |   $ sudo apt update -y
29 |   $ sudo apt install mariadb-server mariadb-client -y
30 | $ systemctl status mariadb 31 | $ mysql_secure_installation 32 | $ mysql -h localhost -u root -p
33 | ]> status 34 | ]> CREATE DATABASE IF NOT EXISTS db_test; 35 | ]> show databases; 36 | ]> use db_test; 37 |
38 | Task 2: 39 | $ sudo apt install postgresql
40 | $ sudo -u postgres createuser --interactive 41 | $ sudo -u postgres createdb db_test 42 | $ sudo -u postgres psql -d postgres 43 |
44 |
45 |
46 |
If You have read all and understood 47 |
48 | `touch IReadAllAndUndnderstood`{{exec}}
49 | 
50 | -------------------------------------------------------------------------------- /Linux/services/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/services/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Linux/services/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | # node 1 = 172.30.1.2 2 | # node 2 = 172.30.2.2 3 | -------------------------------------------------------------------------------- /Linux/services/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished this scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | - [wikipedia.org - Comparison of DNS server software](https://en.wikipedia.org/wiki/Comparison_of_DNS_server_software) 5 | - [wikipedia.org - Comparison of DHCP server software](https://en.wikipedia.org/wiki/Comparison_of_DHCP_server_software) 6 | - [wikipedia.org - Comparison of FTP server software packages](https://en.wikipedia.org/wiki/Comparison_of_FTP_server_software_packages) 7 | - [wikipedia.org - List of LDAP software](https://en.wikipedia.org/wiki/List_of_LDAP_software) 8 | - [wikipedia.org - Comparison of web server software](https://en.wikipedia.org/wiki/Comparison_of_web_server_software) 9 | - [wikipedia.org - List of relational database management systems](https://en.wikipedia.org/wiki/List_of_relational_database_management_systems) 10 | - [wikipedia.org - Virtual private network](https://en.wikipedia.org/wiki/Virtual_private_network) 11 | - [wikipedia.org - Comparison of VoIP software](https://en.wikipedia.org/wiki/Comparison_of_VoIP_software#Server_software) 12 | 13 | For better assimilation of the material, [TAKE THIS COURSE AGAIN](/kodxxl/course/Linux/bash) or pass this scenario [ONE MORE TIME](/kodxxl/course/Linux/services) 14 | -------------------------------------------------------------------------------- /Linux/services/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to Enterprise services scenario! 2 | 3 | Read some useful articles before: 4 | - [wikipedia.org - Comparison of DNS server software](https://en.wikipedia.org/wiki/Comparison_of_DNS_server_software) 5 | - [wikipedia.org - Comparison of DHCP server software](https://en.wikipedia.org/wiki/Comparison_of_DHCP_server_software) 6 | - [wikipedia.org - Comparison of FTP server software packages](https://en.wikipedia.org/wiki/Comparison_of_FTP_server_software_packages) 7 | - [wikipedia.org - List of LDAP software](https://en.wikipedia.org/wiki/List_of_LDAP_software) 8 | - [wikipedia.org - Comparison of web server software](https://en.wikipedia.org/wiki/Comparison_of_web_server_software) 9 | - [wikipedia.org - List of relational database management systems](https://en.wikipedia.org/wiki/List_of_relational_database_management_systems) 10 | - [wikipedia.org - Virtual private network](https://en.wikipedia.org/wiki/Virtual_private_network) 11 | - [wikipedia.org - Comparison of VoIP software](https://en.wikipedia.org/wiki/Comparison_of_VoIP_software#Server_software) 12 | 13 | Now, lets start! 14 | -------------------------------------------------------------------------------- /Linux/services/ssh_vpn.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | Secure Socket Shell: 4 | - [ssh.com - SSH Protocol](https://www.ssh.com/academy/ssh/protocol) 5 | - [redhat.com - OpenSSH](https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-openssh) 6 | - [itsfoss.com - Complete Guide to Configuring SSH in Ubuntu](https://itsfoss.com/set-up-ssh-ubuntu/) 7 | - [digitalocean.com - How to Set Up SSH Keys on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-22-04) 8 | - [ssh.com - SSH Tunneling: Examples, Command, Server Config](https://www.ssh.com/academy/ssh/tunneling-example) 9 | 10 | Manual pages: 11 | - `man ssh`{{exec}} 12 | - `man ssh_config`{{exec}} 13 | - `man sshd_config`{{exec}} 14 | 15 | IP Security - IPSec: 16 | - [wikipedia.org - IPsec](https://en.wikipedia.org/wiki/IPsec) 17 | - [unixwiz.net - An Illustrated Guide to IPsec](http://unixwiz.net/techtips/iguide-ipsec.html) 18 | - [strongswan.org - strongSwan Documentation](https://docs.strongswan.org/docs/5.9/index.html) 19 | 20 | OpenVPN: 21 | - [openvpn.net - Community Resources](https://openvpn.net/community-resources/) 22 | - [opensource.com - Configure your OpenVPN server](https://opensource.com/article/21/7/openvpn-firewall) 23 | - [digitalocean.com - How To Set Up and Configure an OpenVPN Server on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-and-configure-an-openvpn-server-on-ubuntu-22-04) 24 | 25 | Wireguard VPN: 26 | - [wireguard.com - Main page](https://www.wireguard.com/) 27 | - [wireguard.com - Quick Start](https://www.wireguard.com/quickstart/) 28 | - [digitalocean.com - How To Set Up WireGuard on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-wireguard-on-ubuntu-22-04) 29 | 30 | Interesting video tutorials: 31 | - [youtube.com - Full Course about SSH](https://www.youtube.com/watch?v=HCxAbC7Xui0) 32 | - [youtube.com - IP Sec VPN Fundamentals](https://www.youtube.com/watch?v=15amNny_kKI) 33 | - [youtube.com - IPsec Site to Site VPN Tunnels Explained](https://www.youtube.com/watch?v=CuxyZiSCSfc) 34 | - [youtube.com - VPN Everything! OpenVPN Gateway Tutorial](https://www.youtube.com/watch?v=xFficDCEv3c) 35 | - [youtube.com - WireGuard installation and configuration](https://www.youtube.com/watch?v=bVKNSf1p1d0) 36 |
37 |
Secure SH RFC's 38 |
39 |   RFC 4251 — The Secure Shell (SSH) Protocol Architecture
40 |   RFC 4252 — The Secure Shell (SSH) Authentication Protocol
41 |   RFC 4253 — The Secure Shell (SSH) Transport Layer Protocol
42 |   RFC 4254 — The Secure Shell (SSH) Connection Protocol
43 |   RFC 4254 — The Secure Shell (SSH) Public Key File Format
44 | 
45 |
46 |
SSH-based Virtual Private Networks 47 |
48 | The following example would connect client network 10.0.50.0/24 with remote network 10.0.99.0/24
49 | using a point-to-point connection from 10.1.1.1 to 10.1.1.2:
50 | 10.0.50.0/24 <-> 10.1.1.1 <-=| 192.168.1.15 |=-> 10.1.1.2 <-> 10.0.99.0/24
51 | On the client (SSH server running on the gateway to the remote network, at 192.168.1.15): 52 | # ssh -f -w 0:1 192.168.1.15 true 53 | # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252 54 | # route add 10.0.99.0/24 10.1.1.2
55 | On the server: 56 | # ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252 57 | # route add 10.0.50.0/24 10.1.1.1 58 |
59 |
60 |
61 | 62 | Task list: 63 | - Read ALL documentation on the links above and watch videos 64 | 65 |
If You have read all and understood 66 |
67 | `touch IReadAllAndUndnderstood`{{exec}}
68 | 
69 | -------------------------------------------------------------------------------- /Linux/services/voip.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | Asterisk: 4 | - [asterisk.org - Main page](https://www.asterisk.org/) 5 | - [asterisk.org - Documentation](https://www.asterisk.org/community/documentation/) 6 | 7 | OpenSIPS: 8 | - [opensips.org - Main page](https://opensips.org/) 9 | - [opensips.org - Manuals](https://www.opensips.org/Documentation/Manuals) 10 | - [github.com - OpenSIPS source code](https://github.com/OpenSIPS/opensips) 11 | 12 | Kamailio: 13 | - [kamailio.org - Main page](https://www.kamailio.org/w/) 14 | - [kamailio.org - Documentation](https://www.kamailio.org/w/documentation/) 15 | - [github.com - Kamailio source code](https://github.com/kamailio/kamailio) 16 | 17 | FreeSWITCH: 18 | - [signalwire.com - FreeSWITCH](https://signalwire.com/freeswitch) 19 | - [signalwire.com - FreeSWITCH Explained](https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/) 20 | 21 | Interesting video tutorials: 22 | - [youtube.com - Official Asterisk YouTube Channel](https://www.youtube.com/asteriskvideos) 23 | - [youtube.com - Kamailio & Asterisk: What, Why & How](https://www.youtube.com/watch?v=NbsP4u6T8bs) 24 | - [youtube.com - When Should You Use Kamailio?](https://www.youtube.com/watch?v=IaYOboZQEw0) 25 | - [youtube.com - Using Kamailio for Scalability](https://www.youtube.com/watch?v=54qQewLEb3E) 26 | - [youtube.com - Asynchronicity in VoIP and OpenSIPs](https://www.youtube.com/watch?v=gbBh6I48vv0) 27 | - [youtube.com - FreeSWITCH Playlist](https://www.youtube.com/playlist?list=PLcrU7LQXdqpezY3jiVuKMQhbd0Brafz1D) 28 | 29 | Task list: 30 | - Read ALL documentation on the links above and watch videos 31 | 32 |
If You have read all and understood 33 |
34 | `touch IReadAllAndUndnderstood`{{exec}}
35 | 
36 | -------------------------------------------------------------------------------- /Linux/services/web_lb.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [envoyproxy.io - Envoy documentation](https://www.envoyproxy.io/docs) 4 | - [nginx.org - nginx documentation](https://nginx.org/en/docs/) 5 | - [traefik.io - Traefic Proxy documentation](https://doc.traefik.io/traefik/) 6 | - [haproxy.org - HAProxy Documentation](http://docs.haproxy.org/) 7 | - [apache.org - Apache HTTP Server Documentation](https://httpd.apache.org/docs/) 8 | 9 | Interesting video tutorials: 10 | - [youtube.com - The NGINX Crash Course](https://www.youtube.com/watch?v=7VAI73roXaY) 11 | - [youtube.com - Envoy Proxy Crash Course](https://www.youtube.com/watch?v=40gKzHQWgP0) 12 | - [youtube.com - Envoy Internals Deep Dive - Matt Klein, Lyft](https://www.youtube.com/watch?v=gQF23Vw0keg) 13 | - [youtube.com - Is this the BEST Reverse Proxy for Docker?](https://www.youtube.com/watch?v=wLrmmh1eI94) 14 | - [youtube.com - HAProxy playlist](https://www.youtube.com/playlist?list=PLQnljOFTspQUhgfvpgfxc-uFlWElKIBr-) 15 |
16 | 17 | Task list: 18 | - Read ALL documentation on the links above and watch videos 19 | - Play with Envoy 20 | - Play with nginx 21 | - Play with HAProxy 22 | - Play with Apache HTTP Server 23 |
24 |
If You have read all and understood 25 |
26 | `touch IReadAllAndUndnderstood`{{exec}}
27 | 
28 | -------------------------------------------------------------------------------- /Linux/storage/filesystems.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [kernel.org - Overview of the Linux Virtual File System](https://www.kernel.org/doc/html/next/filesystems/vfs.html) 4 | - [tldp.org - The File system](https://tldp.org/LDP/tlk/fs/filesystem.html) 5 | - [kernel.org - FS tree of kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs) 6 | - [kernel.org - ext4 Filesystem](https://www.kernel.org/doc/html/v4.19/filesystems/ext4/index.html) 7 | - [readthedocs.io - BTRFS documentation](https://btrfs.readthedocs.io/en/latest/) 8 | - [kernel.org - BTRFS](https://docs.kernel.org/filesystems/btrfs.html) 9 | - [github.io - OpenZFS Documentation](https://openzfs.org/wiki/Documentation) 10 | - [learnxinyminutes.com - ZFS](https://learnxinyminutes.com/docs/zfs/) 11 | 12 | Manual pages: 13 | - `man fs`{{exec}} 14 | - `man fstab`{{exec}} 15 | - `man mount`{{exec}} 16 | - `man ext4`{{exec}} 17 | 18 | Interesting video tutorials: 19 | - [youtube.com - Linux Internals: Virtual File System (VFS)](https://www.youtube.com/watch?v=J4qWNNISdJk) 20 | - [youtube.com - ZFS on Linux the Billion dollar file system](https://www.youtube.com/watch?v=n0Uskl9fcKI) 21 | - [youtube.com - Best Filesystem of 2023](https://www.youtube.com/watch?v=O9QZVzq-rX4) 22 |
23 |
/etc/fstab 24 |
25 |   /etc/fstab - static information about the filesystems
26 | <device-spec> <mount-point> <fs-type> <options> <dump> <pass>
27 | device-spec – The device name, label, UUID, or other means of specifying the partition or data source this entry refers to. 28 | mount-point – Where the contents of the device may be accessed after mounting; for swap partitions or files, this is set to none. 29 | fs-type – The type of file system to be mounted. 30 | options – Options describing various other aspects of the file system. 31 | dump – A number indicating whether and how often the file system should be backed up by the dump program; a zero indicates the file system will never be automatically backed up. 32 | pass – A number indicating the order in which the fsck program will check the devices for errors at boot time 33 |
34 |
35 |
/etc/fstab fs options 36 |
37 |   auto / noauto - device will be mounted automatically at bootup or when the mount -a command is issued.
38 |   dev / nodev - controls behavior of the interpretation of block special devices on the filesystem.
39 |   exec / noexec - lets binaries that are on the partition be executed, whereas noexec is the opposite.
40 |   rw / ro - mount the filesystem in either read write or read only mode.
41 |   sync / async - how the input and output to the filesystem should be done.
42 |   suid / nosuid - controls the behavior of the operation of suid, and sgid bits.
43 |   user / users / nouser - permits any user to mount the filesystem.
44 |   defaults - use default settings. For ext3 file systems is equivalent to rw,suid,dev,exec,auto,nouser,async.
45 |   owner (Linux-specific) - permit the owner of device to mount.
46 |   atime / noatime / relatime / strictatime (Linux-specific) - The Unix stat structure records when files are last accessed (atime), modified (mtime), and changed (ctime).
47 | 
48 |
49 |
50 | 51 | Task list: 52 | - Create file of 512Mb size filled by zeroes 53 | - Format this file with one of filesystems 54 | - Mount it to ~/mnt/ and write some files 55 | 56 |
Hints for the task 57 |
58 | Task 1 - 2:
59 |   $ dd if=/dev/zero of=myffs bs=1M count=512
60 |   $ MYFFS=$(losetup --find --show myffs)
61 |   $ mkfs.ext4 ${MYFFS}
62 | 
63 | Task 2: 64 | $ mkdir ~/mnt/ 65 | $ mount ${MYFFS} ~/mnt/ 66 | $ touch ~/mnt/test 67 | $ umount ~/mnt/ 68 |
69 |
70 |
71 |
If You have read all and understood 72 |
73 | `touch IReadAllAndUndnderstood`{{exec}}
74 | 
75 | -------------------------------------------------------------------------------- /Linux/storage/fileutils.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [gnu.org - File space usage](https://www.gnu.org/software/coreutils/manual/html_node/File-space-usage.html) 4 | - [gnu.org - Parted User’s Manual](https://www.gnu.org/software/parted/manual/parted.html) 5 | 6 | Source code: 7 | 8 | - [util-linux disk-utils](https://github.com/util-linux/util-linux/tree/master/disk-utils) 9 | - [parted](https://github.com/Distrotech/parted) 10 | 11 | Manual pages: 12 | - `man parted`{{exec}} 13 | - `man fdisk`{{exec}} 14 | - `man mount`{{exec}} 15 | - `man fsck`{{exec}} 16 |
17 |
Util-linux filesystem tools 18 |
 19 |   addpart    - tell the kernel about the existence of a partition.
 20 |   blkdiscard - discard sectors on a device
 21 |   blkid      - locate/print block device attributes
 22 |   blkzone    - run zone command on a device
 23 |   blockdev   - call block device ioctls from the command line
 24 |   cfdisk     - display or manipulate a disk partition table
 25 |   delpart    - tell the kernel to forget about a partition
 26 |   fdisk      - manipulate disk partition table
 27 |   findfs     - find a filesystem by label or UUID
 28 |   findmnt    - display information about mounted filesystems
 29 |   fsck       - check and repair a Linux filesystem
 30 |   fsfreeze   - suspend access to a filesystem (Ext3/4, ReiserFS, JFS, XFS)
 31 |   fstrim     - discard unused blocks on a mounted filesystem
 32 |   isosize    - output the length of an iso9660 filesystem
 33 |   losetup    - set up and control loop devices
 34 |   lsblk      - list block devices
 35 |   lsfd | lsof - list open files
 36 |   lslocks    - list local system locks
 37 |   lsns       - list namespaces
 38 |   mkfs       - build a Linux filesystem
 39 |   mkswap     - set up a Linux swap area
 40 |   mount      - mount a filesystem
 41 |   umount     - unmount file systems
 42 |   raw        - bind a Linux raw character device
 43 |   resizepart - tell the kernel about the new size of a partition
 44 |   sfdisk     - display or manipulate a disk partition table
 45 |   swaplabel  - print or change the label or UUID of a swap area
 46 |   swapon, swapoff - enable/disable devices and files for paging and swapping
 47 |   wipefs     - wipe a signature from a device
 48 | 
49 |
50 |
Coreutils filesystem tools 51 |
 52 |   df       - report file system disk space usage
 53 |   du       - estimate file space usage
 54 |   stat     - display file or file system status
 55 |   sync     - synchronize cached writes to persistent storage
 56 |   truncate - shrink or extend the size of a file to the specified size
 57 | 
58 |
59 |
Filesystem monitoring tools 60 |
 61 |   iwatch - realtime filesystem monitoring program using inotify
 62 |   iostat - input/output statistics for devices and partitions
 63 |   iotop  - simple top-like I/O monitor
 64 | 
65 |
66 |
67 | 68 | Task list: 69 | - Create loopback device with size of 512Mb 70 | - Make GPT partition table on it 71 | - Create 2 partitions and mount them into different folders 72 | 73 |
Hints for the task 74 |
 75 | Task 1:
 76 |   $ dd if=/dev/zero of=myffs bs=1M count=512
 77 |   $ MYFFS=$(losetup --find --show myffs)
 78 | 
79 | Task 2: 80 | $ parted ${MYFFS} mktable gpt 81 |
82 | Task 3: 83 | $ parted ${MYFFS} -- mkpart primary ext4 12MiB 252MiB 84 | $ parted ${MYFFS} -- mkpart primary btrfs 252MiB -34s 85 | $ parted ${MYFFS} -- print 86 |
87 | $ mkfs.ext4 ${MYFFS}p1 88 | $ mkfs.btrfs ${MYFFS}p2 89 |
90 | $ fsck ${MYFFS}p1 91 | $ btrfsck ${MYFFS}p2 92 |
93 | $ mkdir mnt.ext4 94 | $ mkdir mnt.btrfs 95 | $ mount ${MYFFS}p1 mnt.ext4/ 96 | $ mount ${MYFFS}p2 mnt.btrfs/ 97 |
98 | $ findmnt mnt.ext4/ 99 | $ findmnt mnt.btrfs/ 100 |
101 |
102 |
103 |
If You have read all and understood 104 |
105 | `touch IReadAllAndUndnderstood`{{exec}}
106 | 
107 | -------------------------------------------------------------------------------- /Linux/storage/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Linux storage practice", 3 | "description": "Linux storage subsystem theory and practice", 4 | "details": { 5 | "intro": { 6 | "text": "service/intro.md", 7 | "foreground": "scripts/foreground.sh", 8 | "background": "scripts/background.sh" 9 | }, 10 | "steps": [ 11 | { 12 | "title": "1/5 Filesystems [48:00]", 13 | "text": "filesystems.md", 14 | "verify": "scripts/check.sh" 15 | },{ 16 | "title": "2/5 Filesystem utilities [36:00]", 17 | "text": "fileutils.md", 18 | "verify": "scripts/check.sh" 19 | },{ 20 | "title": "3/5 Software RAID [24:00]", 21 | "text": "raid.md", 22 | "verify": "scripts/check.sh" 23 | },{ 24 | "title": "4/5 Logical Volume Manager [12:00]", 25 | "text": "lvm.md", 26 | "verify": "scripts/check.sh" 27 | },{ 28 | "title": "4/5 Storage Area Network [00:00]", 29 | "text": "san.md", 30 | "verify": "scripts/check.sh" 31 | } 32 | ], 33 | "finish": { 34 | "text": "service/finish.md" 35 | } 36 | }, 37 | "backend": { 38 | "imageid": "ubuntu" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Linux/storage/lvm.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [redhat.com - Configuring and managing logical volumes](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/index) 4 | - [tldp.org - LVM HOWTO](https://tldp.org/HOWTO/LVM-HOWTO/) 5 | - [debian.org - LVM](https://wiki.debian.org/LVM) 6 | - [suse.com - LVM Configuration](https://documentation.suse.com/sles/15-SP1/html/SLES-all/cha-lvm.html) 7 | - [archlinux.org - LVM](https://wiki.archlinux.org/title/LVM) 8 | 9 | Manual pages: 10 | - `man lvm`{{exec}} 11 |
12 |
lvm2 built-in commands 13 |
 14 | The following commands are built into lvm without links
15 | config The same as lvmconfig(8) below. 16 | devtypes Display the recognised built-in block device types. 17 | dumpconfig The same as lvmconfig(8) below. 18 | formats Display recognised metadata formats. 19 | fullreport Report information about PVs, PV segments, VGs, LVs and LV segments, all at once. 20 | help Display the help text. 21 | lastlog Display log report of last command run in LVM shell if command log reporting is enabled. 22 | lvpoll Complete lvmpolld operations (Internal command). 23 | segtypes Display recognised Logical Volume segment types. 24 | systemid Display any system ID currently set on this host. 25 | tags Display any tags defined on this host. 26 | version Display version information. 27 |
28 |
29 |
lvm2 commands 30 |
 31 |   pvchange      Change attributes of a Physical Volume.
 32 |   pvck          Check Physical Volume metadata.
 33 |   pvcreate      Initialize a disk or partition for use by LVM.
 34 |   pvdisplay     Display attributes of a Physical Volume.
 35 |   pvmove        Move Physical Extents.
 36 |   pvremove      Remove a Physical Volume.
 37 |   pvresize      Resize a disk or partition in use by LVM2.
 38 |   pvs           Report information about Physical Volumes.
 39 |   pvscan        Scan all disks for Physical Volumes.
40 | vgcfgbackup Backup Volume Group descriptor area. 41 | vgcfgrestore Restore Volume Group descriptor area. 42 | vgchange Change attributes of a Volume Group. 43 | vgck Check Volume Group metadata. 44 | vgconvert Convert Volume Group metadata format. 45 | vgcreate Create a Volume Group. 46 | vgdisplay Display attributes of Volume Groups. 47 | vgexport Make volume Groups unknown to the system. 48 | vgextend Add Physical Volumes to a Volume Group. 49 | vgimport Make exported Volume Groups known to the system. 50 | vgimportclone Import and rename duplicated Volume Group (e.g. a hardware snapshot). 51 | vgmerge Merge two Volume Groups. 52 | vgmknodes Recreate Volume Group directory and Logical Volume specialfiles 53 | vgreduce Reduce a Volume Group by removing one or more Physical Volumes. 54 | vgremove Remove a Volume Group. 55 | vgrename Rename a Volume Group. 56 | vgs Report information about Volume Groups. 57 | vgscan Scan all disks for Volume Groups and rebuild caches. 58 | vgsplit Split a Volume Group into two, moving any logical volumes from one Volume Group to another by moving entire Physical Volumes.
59 | lvchange Change attributes of a Logical Volume. 60 | lvconvert Convert a Logical Volume from linear to mirror or snapshot. 61 | lvcreate Create a Logical Volume in an existing Volume Group. 62 | lvdisplay Display attributes of a Logical Volume. 63 | lvextend Extend the size of a Logical Volume. 64 | lvmconfig Display the configuration information after loading lvm.conf(5) and any other configuration files. 65 | lvmdiskscan Scan for all devices visible to LVM2. 66 | lvmdump Create lvm2 information dumps for diagnostic purposes. 67 | lvreduce Reduce the size of a Logical Volume. 68 | lvremove Remove a Logical Volume. 69 | lvrename Rename a Logical Volume. 70 | lvresize Resize a Logical Volume. 71 | lvs Report information about Logical Volumes. 72 | lvscan Scan (all disks) for Logical Volumes. 73 |
74 |
75 |
76 | 77 | Task list: 78 | - Create 3 loopback devices 256Mb each 79 | - Create 'testvg' lvm2 volume group from this devices 80 | - Create 'testlv1' and 'testlv2' lvm2 logical volumes belongs 'testvg' 81 | - Format 'testlv1' with EXT4 and 'testlv1' with BTRFS 82 | - Delete all created instances 83 | 84 |
Hints for the task 85 |
 86 | Task 1:
 87 |   $ dd if=/dev/zero bs=1M count=256 | tee ld{0..2}
 88 |   $ losetup -Pf ld0
 89 |   $ losetup -Pf ld1
 90 |   $ losetup -Pf ld2
 91 |   $ losetup
92 | Task 2: 93 | $ lvm vgcreate testvg /dev/loop0 /dev/loop1 /dev/loop2 94 | $ lvm pvscan 95 | $ lvm vgs
96 | Task 3: 97 | $ lvm lvcreate -n testlv1 -L 300M testvg 98 | $ lvm lvs 99 | $ lvm vgs
100 | Task 4: 101 | $ mkfs.ext4 /dev/testvg/testlv1 102 | $ mkfs.btrfs /dev/testvg/testlv2
103 | Task 5: 104 | $ lvm lvremove testvg/testlv1 105 | $ lvm lvremove testvg/testlv2 106 | $ lvm vgremove testvg 107 | $ lvm pvremove /dev/loop0 /dev/loop1 /dev/loop2 108 | $ losetup -D 109 |
110 |
111 |
112 |
If You have read all and understood 113 |
114 | `touch IReadAllAndUndnderstood`{{exec}}
115 | 
116 | -------------------------------------------------------------------------------- /Linux/storage/raid.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [snia.org - Common RAID Disk Data Format Specification](https://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf) 4 | - [wikipedia.org - Standard RAID levels](https://en.wikipedia.org/wiki/Standard_RAID_levels) 5 | - [redhat.com - Managing RAID](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/managing-raid_managing-storage-devices) 6 | - [tldp.org - The Software-RAID HOWTO](https://tldp.org/HOWTO/html_single/Software-RAID-HOWTO/) 7 | - [archlinux.org - RAID](https://wiki.archlinux.org/title/RAID) 8 | - [kernel.org - Linux Raid](https://raid.wiki.kernel.org/index.php/Linux_Raid) 9 | - [kernel.org - A guide to mdadm](https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm) 10 | 11 | Manual pages: 12 | - `man mdadm`{{exec}} 13 |
14 |
Primary RAID Levels 15 |
16 |   RAID-0 - Striped array with no parity
17 |   RAID-1 - Mirrored array
18 |   RAID-3 - Striped array with non-rotating parity, optimized for long, singlethreaded transfers
19 |   RAID-4 - Striped array with non-rotating parity, optimized for short, multithreaded transfers
20 |   RAID-5 - Striped array with rotating parity, optimized for short, multi-threaded transfers
21 |   RAID-6 - Similar to RAID-5, but with dual rotating parity physical disks, tolerating two physical disk failures
22 |   
23 | MDF RAID - Multi disk Failure RAID. Similar to RAID-6, but supporting more than two physical disk failures 24 | RAID-1E - >2 disk RAID-1, similar to RAID-10 but with striping integrated intoarray= 25 | Concatenation - Physical disks combined head to tail 26 | RAID-5E - RAID-5 with hot space at end each extent 27 | RAID-5EE - RAID-5 with hot space integrated into each extent 28 | RAID-5R - RAID-5 with parity rotated after a configured number of stripes 29 |
30 |
31 |
Key features of the Linux software RAID stack 32 |
33 |   - Multithreaded design
34 |   - Portability of arrays between Linux machines without reconstruction
35 |   - Backgrounded array reconstruction using idle system resources
36 |   - Hot-swap drive support
37 |   - Automatic CPU detection to take advantage of certain CPU features such as streaming Single Instruction Multiple Data (SIMD) support.
38 |   - Automatic correction of bad sectors on disks in an array.
39 |   - Regular consistency checks of RAID data to ensure the health of the array.
40 |   - Proactive monitoring of arrays with email alerts sent to a designated email address on important events.
41 |   - Write-intent bitmaps, which drastically increase the speed of resync events by allowing the kernel to know precisely which portions of a disk need to be resynced instead of having to resync the entire array after a system crash.
42 | 
43 |
44 |
MDADM modes 45 |
46 |   Assemble - Assemble  the  components  of a previously created array into an active array.
47 |   Build    - Build an array that doesn't have per-device metadata (superblocks). 
48 |   Create   - Create a new array with per-device metadata (superblocks).
49 |   Follow or Monitor - Monitor one or more md devices and act on any state changes.
50 |   Grow     - Grow (or shrink) an array, or otherwise reshape it in some way.
51 |   Incremental Assembly - Add  a  single device to an appropriate array.
52 |   Manage   - This is for doing things to specific components of an array such as adding new spares and removing faulty devices.
53 |   Misc     - This  is an 'everything else' mode that supports operations on active arrays, operations on component devices such as erasing old superblocks, operations.
54 |   Auto-detect - This mode does not act on a specific device or array, but rather it requests the Linux Kernel to activate any auto-detected arrays.
55 | 
56 |
57 |
58 | 59 | Task list: 60 | - Create RAID5 array from 3 devices with DDF metadata 61 | - Make 1 of disks faulty and remove it 62 | - Repair RAID5 array 63 | 64 |
Hints for the task 65 |
66 | Task 1:
67 |   $ dd if=/dev/zero bs=1M count=256 | tee raid{1..3}
68 |   $ sudo losetup -Pf raid1
69 |   $ sudo losetup -Pf raid2
70 |   $ sudo losetup -Pf raid3
71 |   $ losetup
72 |   
73 | $ sudo mdadm --create /dev/md/ddf1 --metadata=ddf --raid-disks=3 /dev/loop{0..2} 74 | $ sudo mdadm --create /dev/md0 --level=5 -n3 /dev/md/ddf1 75 |
76 | $ sudo mdadm --detail /dev/md/ddf1 77 | $ sudo mdadm --detail /dev/md0 78 |
79 | Task 2: 80 | $ sudo mdadm --manage /dev/md0 --fail /dev/loop0 81 | $ sudo mdadm --manage /dev/md/ddf1 --remove /dev/loop0 82 | $ sudo mdadm --detail /dev/md0 83 |
84 | Task 3: 85 | $ sudo mdadm --manage /dev/md/ddf1 --add /dev/loop0 86 | $ sudo mdadm --detail /dev/md0 87 |
88 | $ sudo mdadm --stop /dev/md0 89 | $ sudo mdadm --stop /dev/md/ddf1 90 | $ sudo losetup -D 91 |
92 |
93 |
94 |
If You have read all and understood 95 |
96 | `touch IReadAllAndUndnderstood`{{exec}}
97 | 
98 | -------------------------------------------------------------------------------- /Linux/storage/san.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [wikipedia.org - ATA over Ethernet](https://en.wikipedia.org/wiki/ATA_over_Ethernet) 4 | - [kernel.org - ATA over Ethernet (AoE)](https://docs.kernel.org/admin-guide/aoe/index.html) 5 | - [wikipedia.org - ISCSI](https://en.wikipedia.org/wiki/ISCSI) 6 | - [github.com - tgt](https://github.com/fujita/tgt) 7 | - [github.com - open-iscsi](https://github.com/open-iscsi/open-iscsi) 8 | - [techviewleo.com - Configure iSCSI Target on Ubuntu](https://techviewleo.com/configure-iscsi-target-on-ubuntu/) 9 | - [ubuntu.com - iSCSI Initiator (or Client)](https://ubuntu.com/server/docs/service-iscsi) 10 | - [redhat.com - Configuring an iSCSI target](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/configuring-an-iscsi-target_managing-storage-devices) 11 |
12 | 13 |
If You have read all and understood 14 |
15 | `touch IReadAllAndUndnderstood`{{exec}}
16 | 
17 | -------------------------------------------------------------------------------- /Linux/storage/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Linux/storage/scripts/check.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Linux/storage/scripts/foreground.sh: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Linux/storage/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished this scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | - [wikibooks.org - Storage functionality](https://en.wikibooks.org/wiki/The_Linux_Kernel/Storage#Block_device_layer) 5 | - [redhat.com - Managing storage devices](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/index) 6 | - [suse.com - Storage Administration Guide](https://documentation.suse.com/sles/15-SP1/html/SLES-all/book-storage.html) 7 | - [kernel.org - Filesystems in the Linux kernel](https://docs.kernel.org/filesystems/#filesystems) 8 | 9 | And watch some videos: 10 | - [youtube.com - Linux kernel IO subsystem](https://www.youtube.com/watch?v=2tu__ZHC0mI) 11 | - [youtube.com - Introduction to the Linux Block I/O Layer](https://www.youtube.com/watch?v=ebHINEF6PDk) 12 | - [youtube.com - Linux Internals: Storage](https://www.youtube.com/watch?v=jzcMOObRtLo) 13 | 14 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/storage) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/services)! 15 | -------------------------------------------------------------------------------- /Linux/storage/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to Linux Storage scenario! 2 | 3 | Read some useful articles before: 4 | - [wikibooks.org - Storage functionality](https://en.wikibooks.org/wiki/The_Linux_Kernel/Storage#Block_device_layer) 5 | - [redhat.com - Managing storage devices](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/index) 6 | - [suse.com - Storage Administration Guide](https://documentation.suse.com/sles/15-SP6/html/SLES-all/book-storage.html) 7 | - [kernel.org - Filesystems in the Linux kernel](https://docs.kernel.org/filesystems/#filesystems) 8 | 9 | And watch some videos: 10 | - [youtube.com - Linux kernel IO subsystem](https://www.youtube.com/watch?v=2tu__ZHC0mI) 11 | - [youtube.com - Introduction to the Linux Block I/O Layer](https://www.youtube.com/watch?v=ebHINEF6PDk) 12 | - [youtube.com - Linux Internals: Storage](https://www.youtube.com/watch?v=jzcMOObRtLo) 13 | 14 | Now, lets start! 15 | -------------------------------------------------------------------------------- /Linux/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "1 - Linux administration", 3 | "description" : "Learn how to administer linux hosts", 4 | "items": [ 5 | { 6 | "path": "bash", 7 | "title": "Introduction to BASH shell", 8 | "description" : "MON - Practice with BASH scripting" 9 | }, 10 | { 11 | "path": "common", 12 | "title": "Common linux utilities", 13 | "description" : "TUE - Most common linux utilities theory and practice" 14 | }, 15 | { 16 | "path": "localhost", 17 | "title": "Localhost administration", 18 | "description": "WED - Learn how to administer localhost" 19 | }, 20 | { 21 | "path": "networking", 22 | "title": "Linux networking practice", 23 | "description" : "THU - Practice with linux networking" 24 | }, 25 | { 26 | "path": "storage", 27 | "title": "Linux storage practice", 28 | "description" : "FRI - Practice with linux storage" 29 | }, 30 | { 31 | "path": "services", 32 | "title": "Services for enterprise", 33 | "description": "SAT - Most popular services and applications" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /Performance/CPU/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/CPU/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/CPU/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/CPU/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/CPU/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/Disks/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/Disks/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/Disks/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/Disks/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/Disks/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/FS/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/FS/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/FS/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/FS/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/FS/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/Memory/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/Memory/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/Memory/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/Memory/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/Memory/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/Network/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/Network/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/Network/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/Network/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/Network/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/OS_theory/1_boot.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - [wikipedia.org - Booting process of Linux](https://en.wikipedia.org/wiki/Booting_process_of_Linux) 4 | - [suse.com - Introduction to the boot process](https://documentation.suse.com/ru-ru/sles/15-SP5/html/SLES-all/cha-boot.html) 5 | - [freecodecamp.org - Linux Boot Process](https://www.freecodecamp.org/news/linux-boot-process-in-rhel/) 6 | - [baeldung.com - Guide to the Boot Process of a Linux System](https://www.baeldung.com/linux/boot-process) 7 | - [gnu.org - GNU GRUB Manual](https://www.gnu.org/software/grub/manual/grub/html_node/index.html) 8 | - [freedesktop.org - systemd-boot UEFI Boot Manager](https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/) 9 | 10 | Interesting video tutorials: 11 | - [youtube.com - How Does Linux Boot Process Work?](https://www.youtube.com/watch?v=XpFsMB6FoOs) 12 | 13 | Manual pages: 14 | - `info grub-install` {{exec}} 15 | - `man initrd`{{exec}} 16 |
17 |
Lesson info and tips 18 |
19 |    -
20 | 
21 |
22 |
Other tips 23 |
24 |    -
25 | 
26 |
27 |
28 | 29 | Task list: 30 | - Read ALL documentation on the links above and watch videos 31 | - Task 1 32 | - Task 2 33 | 34 |
Hints for the task 35 |
36 | Task 1:
37 |   $ cmd1
38 |   $ echo ${string:7:3}
39 | 
40 | Task 2: 41 | $ echo ${#string} 42 | $ string= 43 |
44 |
45 |
46 |
If You have read all and understood 47 |
48 | `touch IReadAllAndUndnderstood`{{exec}}
49 | 
50 | -------------------------------------------------------------------------------- /Performance/OS_theory/2_alter_bios.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - []() 4 | 5 | Interesting video tutorials: 6 | - [youtube.com - ]() 7 | 8 | Manual pages: 9 | - `man `{{exec}} 10 |
11 |
Lesson info and tips 12 |
13 |    -
14 | 
15 |
16 |
Other tips 17 |
18 |    -
19 | 
20 |
21 |
22 | 23 | Task list: 24 | - Read ALL documentation on the links above and watch videos 25 | - Task 1 26 | - Task 2 27 | 28 |
Hints for the task 29 |
30 | Task 1:
31 |   $ cmd1
32 |   $ echo ${string:7:3}
33 | 
34 | Task 2: 35 | $ echo ${#string} 36 | $ string= 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Performance/OS_theory/3_kernel_subsystems.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - []() 4 | 5 | Interesting video tutorials: 6 | - [youtube.com - ]() 7 | 8 | Manual pages: 9 | - `man `{{exec}} 10 |
11 |
Lesson info and tips 12 |
13 |    -
14 | 
15 |
16 |
Other tips 17 |
18 |    -
19 | 
20 |
21 |
22 | 23 | Task list: 24 | - Read ALL documentation on the links above and watch videos 25 | - Task 1 26 | - Task 2 27 | 28 |
Hints for the task 29 |
30 | Task 1:
31 |   $ cmd1
32 |   $ echo ${string:7:3}
33 | 
34 | Task 2: 35 | $ echo ${#string} 36 | $ string= 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Performance/OS_theory/4_scheduler.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - []() 4 | 5 | Interesting video tutorials: 6 | - [youtube.com - ]() 7 | 8 | Manual pages: 9 | - `man `{{exec}} 10 |
11 |
Lesson info and tips 12 |
13 |    -
14 | 
15 |
16 |
Other tips 17 |
18 |    -
19 | 
20 |
21 |
22 | 23 | Task list: 24 | - Read ALL documentation on the links above and watch videos 25 | - Task 1 26 | - Task 2 27 | 28 |
Hints for the task 29 |
30 | Task 1:
31 |   $ cmd1
32 |   $ echo ${string:7:3}
33 | 
34 | Task 2: 35 | $ echo ${#string} 36 | $ string= 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Performance/OS_theory/5_storage_subsystem.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - []() 4 | 5 | Interesting video tutorials: 6 | - [youtube.com - ]() 7 | 8 | Manual pages: 9 | - `man `{{exec}} 10 |
11 |
Lesson info and tips 12 |
13 |    -
14 | 
15 |
16 |
Other tips 17 |
18 |    -
19 | 
20 |
21 |
22 | 23 | Task list: 24 | - Read ALL documentation on the links above and watch videos 25 | - Task 1 26 | - Task 2 27 | 28 |
Hints for the task 29 |
30 | Task 1:
31 |   $ cmd1
32 |   $ echo ${string:7:3}
33 | 
34 | Task 2: 35 | $ echo ${#string} 36 | $ string= 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Performance/OS_theory/6_network_subsystem.md: -------------------------------------------------------------------------------- 1 | First of all - useful links: 2 | 3 | - []() 4 | 5 | Interesting video tutorials: 6 | - [youtube.com - ]() 7 | 8 | Manual pages: 9 | - `man `{{exec}} 10 |
11 |
Lesson info and tips 12 |
13 |    -
14 | 
15 |
16 |
Other tips 17 |
18 |    -
19 | 
20 |
21 |
22 | 23 | Task list: 24 | - Read ALL documentation on the links above and watch videos 25 | - Task 1 26 | - Task 2 27 | 28 |
Hints for the task 29 |
30 | Task 1:
31 |   $ cmd1
32 |   $ echo ${string:7:3}
33 | 
34 | Task 2: 35 | $ echo ${#string} 36 | $ string= 37 |
38 |
39 |
40 |
If You have read all and understood 41 |
42 | `touch IReadAllAndUndnderstood`{{exec}}
43 | 
44 | -------------------------------------------------------------------------------- /Performance/OS_theory/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/6 Boot process [00:00]", 11 | "text": "1_boot.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/6 Alternative BIOS [00:00]", 15 | "text": "2_alter_bios.md", 16 | "verify": "scripts/check.sh" 17 | },{ 18 | "title": "3/6 Kernel subsystems [00:00]", 19 | "text": "3_kernel_subsystems.md", 20 | "verify": "scripts/check.sh" 21 | },{ 22 | "title": "4/6 Scheduler [00:00]", 23 | "text": "4_scheduler.md", 24 | "verify": "scripts/check.sh" 25 | },{ 26 | "title": "5/6 Storage subsystem [00:00]", 27 | "text": "5_storage_subsystem.md", 28 | "verify": "scripts/check.sh" 29 | },{ 30 | "title": "6/6 Network subsystem [00:00]", 31 | "text": "6_network_subsystem.md", 32 | "verify": "scripts/check.sh" 33 | } 34 | ], 35 | "finish": { 36 | "text": "service/finish.md" 37 | } 38 | }, 39 | "backend": { 40 | "imageid": "ubuntu" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Performance/OS_theory/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/OS_theory/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/OS_theory/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/OS_theory/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to OS theory! 2 | 3 | Read some useful articles before: 4 | 5 | - [tutorialspoint.com - Operating System Tutorial](https://www.tutorialspoint.com/operating_system/index.htm) 6 | - [kernel.org - Kernel subsystem documentation](https://docs.kernel.org/subsystem-apis.html) 7 | - [intel.com - Software Developer Manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html) 8 | - [amd.com - Architecture Programmer's Manual, Volume 2 PDF](https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/24593.pdf) 9 | - `man boot`{{exec}} 10 | 11 | And watch some video tutorials: 12 | 13 | - [youtube.com - Operating System - Neso Academy](https://www.youtube.com/playlist?list=PLBlnK6fEyqRiVhbXDGLXDk_OQAeuVcp2O) 14 | - [youtube.com - CS 377 Spring '14: Operating Systems](https://www.youtube.com/playlist?list=PLacuG5pysFbDQU8kKxbUh4K5c1iL5_k7k) 15 | - [youtube.com - Structures of Operating System - Neso Academy](https://www.youtube.com/playlist?list=PLBlnK6fEyqRgRF-FUWec-0w4yWCurLy1t) 16 | - [youtube.com - Introduction to Operating System - Mike Murphy](https://www.youtube.com/watch?v=dOiA2nNJpc0) 17 | - [youtube.com - Fundamentals of Operating Systems - Mitch Davis](https://www.youtube.com/playlist?list=PLW1yb8L3S1ngGmtKlI5XYcTNQQ1r3xZvq) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/Observability_Tools/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/Observability_Tools/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/Observability_Tools/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/Observability_Tools/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/Observability_Tools/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/SAR_perf_Ftrace/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Title of scenario", 3 | "details": { 4 | "intro": { 5 | "text": "service/intro.md", 6 | "background": "scripts/background.sh" 7 | }, 8 | "steps": [ 9 | { 10 | "title": "1/2 Title [00:00]", 11 | "text": "step1_text.md", 12 | "verify": "scripts/check.sh" 13 | },{ 14 | "title": "2/2 Title [00:00]", 15 | "text": "step2_text.md", 16 | "verify": "scripts/check.sh" 17 | } 18 | ], 19 | "finish": { 20 | "text": "service/finish.md" 21 | } 22 | }, 23 | "backend": { 24 | "imageid": "ubuntu" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Performance/SAR_perf_Ftrace/scripts/background.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "alias }='touch IReadAllAndUndnderstood'" >> /etc/bash.bashrc 3 | -------------------------------------------------------------------------------- /Performance/SAR_perf_Ftrace/scripts/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm IReadAllAndUndnderstood 4 | -------------------------------------------------------------------------------- /Performance/SAR_perf_Ftrace/service/finish.md: -------------------------------------------------------------------------------- 1 | You have finished BASH scenario! 2 | 3 | Read again useful articles to consolidate your knowledge: 4 | 5 | - [Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 6 | - [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 7 | - [Bash scripting cheatsheet](https://devhints.io/bash) 8 | - [RedHat - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 9 | - [Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 10 | - `man bash`{{exec}} 11 | 12 | And watch this videos: 13 | 14 | - [Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 15 | - [Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 16 | - [Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 17 | 18 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/bash) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/common)! 19 | -------------------------------------------------------------------------------- /Performance/SAR_perf_Ftrace/service/intro.md: -------------------------------------------------------------------------------- 1 | Welcome to BASH scenario! 2 | 3 | Read some useful articles before: 4 | 5 | - [gnu.org - Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/index.html) 6 | - [tldp.org - Bash Guide for Beginners](https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html) 7 | - [tldp.org - Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/) 8 | - [devhints.io - Bash scripting cheatsheet](https://devhints.io/bash) 9 | - [redhat.com - Bash Commands Cheat Sheet](https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet) 10 | - [learnxinyminutes.com - Learn BASH in Y minutes](https://learnxinyminutes.com/docs/bash/) 11 | - `man bash`{{exec}} 12 | 13 | And watch some video tutorials: 14 | 15 | - [youtube.com - Bash in 100 Seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) 16 | - [youtube.com - Advanced Bash Scripting Tutorial](https://www.youtube.com/watch?v=emhouufDnB4) 17 | - [youtube.com - Introduction to Advanced Bash Usage](https://www.youtube.com/watch?v=uqHjc7hlqd0) 18 | 19 | Now, lets start! 20 | -------------------------------------------------------------------------------- /Performance/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "title" : "2 - Linux System Perfomance", 3 | "description" : "Covers concepts, strategy, tools, and tuning for operating system", 4 | "items": [ 5 | { 6 | "path": "OS_theory", 7 | "title": "OS theory", 8 | "description": "Operating Systems common theory" 9 | }, 10 | { 11 | "path": "Observability_Tools", 12 | "title": "Observability Tools", 13 | "description": "The most popular monitoring utilities" 14 | }, 15 | { 16 | "path": "CPU", 17 | "title": "CPUs", 18 | "description": "Deep dive into CPU perfomance tuning" 19 | }, 20 | { 21 | "path": "Memory", 22 | "title": "RAM and VM", 23 | "description": "Looking at memory performance" 24 | }, 25 | { 26 | "path": "FS", 27 | "title": "File Systems", 28 | "description": "Looking at memory performance" 29 | }, 30 | { 31 | "path": "Disks", 32 | "title": "Persistent memory devices", 33 | "description": "Monitoring and tuning storage device performance" 34 | }, 35 | { 36 | "path": "Network", 37 | "title": "Network", 38 | "description": "Network Performance Theory and Practice" 39 | }, 40 | { 41 | "path": "SAR_perf_Ftrace", 42 | "title": "SAR, perf, Ftrace", 43 | "description": "Learn powerful tools" 44 | } 45 | ] 46 | } 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DevOps-practice 2 | 3 | This practice lessons created only for my personal trainig at [killercoda.com](https://killercoda.com) 4 | 5 | - [1 - Linux administration course @killercoda.com](https://killercoda.com/kodxxl/course/Linux) - Realized 6 | - [2 - Linux System Perfomance @killerkoda](https://killercoda.com/kodxxl/course/Performance) - Under construction 7 | - 3 - DevOps/SRE course @killercoda.com - Under construction 8 | - 4 - Backend course @killercoda.com - Under construction 9 | - 5 - Frontend cource @killerkoda - Under construction 10 | 11 | Thanks for all who make it possible! 12 | 13 | # Template for all lessons - lesson.md 14 | ``` 15 | First of all - useful links: 16 | 17 | - []() 18 | 19 | Interesting video tutorials: 20 | - [youtube.com - ]() 21 | 22 | Manual pages: 23 | - `man `{{exec}} 24 |
25 |
Lesson info and tips 26 |
 27 |    -
 28 | 
29 |
30 |
Other tips 31 |
 32 |    -
 33 | 
34 |
35 |
36 | 37 | Task list: 38 | - Read ALL documentation on the links above and watch videos 39 | - Task 1 40 | - Task 2 41 | 42 |
Hints for the task 43 |
 44 | Task 1:
 45 |   $ cmd1
 46 |   $ echo ${string:7:3}
 47 | 
48 | Task 2: 49 | $ echo ${#string} 50 | $ string= 51 |
52 |
53 |
54 |
If You have read all and understood 55 |
 56 | `touch IReadAllAndUndnderstood`{{exec}}
 57 | 
58 | ``` 59 | # Template for intro.md 60 | ``` 61 | Welcome to %SCENARIO_NAME% scenario! 62 | 63 | Read some useful articles before: 64 | - [Useful link 1](https://link.org/) 65 | - `some cli command`{{exec}} 66 | 67 | And watch some videos: 68 | - [youtube.com - ](https://link.org/) 69 | - [youtube.com - ](https://link.org/) 70 | 71 | Now, lets start! 72 | ``` 73 | # Template for finish.md 74 | ``` 75 | You have finished this scenario! 76 | 77 | Read again useful articles to consolidate your knowledge: 78 | - [Useful link 1](https://link.org/) 79 | - `some cli command`{{exec}} 80 | 81 | And watch some videos: 82 | - [youtube.com - ](https://link.org/) 83 | - [youtube.com - ](https://link.org/) 84 | 85 | Pass this steps [ONE MORE TIME](/kodxxl/course/Linux/%LINK_TO_THIS%) or see you in the [NEXT SCENARIO](/kodxxl/course/Linux/%LINK_TO_NEXT%)! 86 | ``` 87 | # Template for scenario index.json 88 | ``` 89 | { 90 | "title": "Title of scenario", 91 | "details": { 92 | "intro": { 93 | "text": "service/intro.md", 94 | "background": "scripts/background.sh" 95 | }, 96 | "steps": [ 97 | { 98 | "title": "1/2 Title [00:00]", 99 | "text": "step1_text.md", 100 | "verify": "scripts/check.sh" 101 | },{ 102 | "title": "2/2 Title [00:00]", 103 | "text": "step2_text.md", 104 | "verify": "scripts/check.sh" 105 | } 106 | ], 107 | "finish": { 108 | "text": "service/finish.md" 109 | } 110 | }, 111 | "backend": { 112 | "imageid": "ubuntu" 113 | } 114 | } 115 | ``` 116 | # Template for cource structure.json 117 | ``` 118 | { 119 | "title" : "Name of course", 120 | "description" : "Learn how to ....", 121 | "items": [ 122 | { 123 | "path": "bash", 124 | "title": "1 - Introduction to BASH shell", 125 | "description" : "Practice with BASH scripting" 126 | },{ 127 | "path": "common", 128 | "title": "2 - Common linux utilities", 129 | "description" : "Most common linux utilities theory and practice" 130 | } 131 | ] 132 | } 133 | ``` 134 | --------------------------------------------------------------------------------