timer1

Fullscreen mode

Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.

Overview mode

Press "Esc" or "o" keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides, as if you were at 1,000 feet above your presentation.


Unix/Linux


Lesson 5

Author: Egoshkin Danila Igorevich

Plan

  1. Linux main command: sudo
  2. Linux base commands
  3. Terminal - command line :)
  4. Bash scripts
  5. Bash vs Bat vs PowerShell

Linux main command: sudo

Apt

  • apt - Advanced Package Tool
  • Pacman - PACkage MANager for ARCH-like OS
  • PPM - Puppy Package Manager for Puppy-like OS
  • RPM - Red Hat Package Manager

apt update vs apt upgrade


The same as: git fetch vs git pull
The same as: Only ask vs take

apt update

as same as

git fetch

It just only asks. Nothing more.
Is something changed on the repo?

apt update vs apt upgrade


sudo apt update - Оновлення баз даних пакетів (вказаних в "/etc/apt/sources.list")

sudo apt upgrade - Встановлення оновлень. Оновлення системи.

Linux: ls vs Win: dir

ls - is a command to LiSt files in dir - Unix
dir - is a command to list files in DIR - Windows

Linux, Win: cd

cd - Change Directory
cd F:/
cd /d "F:\HackingTools"

Win: cd

Linux: cd

Tab


Tab - auto-complete dir/file name

Tree

Win: tree

Linux:

                            sh: sudo apt install tree
                            sh: tree --version
                            sh: tree
                        

Linux: chmod

chmod - change mode

COLOR - in console

Win: color n

Linux:

                            #! /usr/bin/env bash

                            RED="31"
                            GREEN="32"
                            BOLDGREEN="\e[1;${GREEN}m"
                            ITALICRED="\e[3;${RED}m"
                            ENDCOLOR="\e[0m"

                            echo -e "${BOLDGREEN}Behold! Bold, green text.${ENDCOLOR}"
                            echo -e "${ITALICRED}Italian italics${ENDCOLOR}"
                        
https://dev.to/ifenna__/adding-colors-to-bash-scripts-48g4

COLOR - in console


                            sh: for COLOR in {1..255}; do echo -en "\e[38;5;${COLOR}m${COLOR} "; done; echo;
                        

Almost commands

sl (сокр. от «Steam Locomotive»)

                        $ sudo apt install sl
                        

Linux, Win: mkdir


mkdir - MaKe directory

Linux touch vs Win ???

Linux: touch - make new file

                            $ touch file.txt
                            $ echo "" > file.txt 
                            $ cat /dev/null > ./file.txt 
                        
Win:

                            $ type nul > file.txt
                            $ copy nul > file.txt
                            $ echo .> file.txt
                            $ cd . > file.txt
                        

Linux, Win: echo


                            $ echo "Hello, Neo!"
                            $ echo "Hi, there!" >> file.txt
                        

Linux: cat vs Win: type


                            $ touch file.txt
                            $ echo "Hello, Neo!" >> file.txt
                            $ cat file.txt
                        

                            $ type nul > file.txt
                            $ echo "Hello, Neo!" > file.txt
                            $ type file.txt
                            $ start file.txt
                        

Linux, Win: wget

wget - download files from web Linux:

                            $ sudo apt-get install wget.
                        

Win: https://eternallybored.org/misc/wget/

OR: WinHTTrack

                            wget -nd -r -P /storage -A jpeg,jpg,bmp,gif,png https://en.wikipedia.org/wiki/Borscht
                        

                            wget -e robots=off --span-hosts --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0" -nd -r -P /storage -A jpeg,jpg,bmp,gif,png https://en.wikipedia.org/wiki/Borscht
                        

Here is some more information:


-nd - prevents the creation of a directory hierarchy (i.e. no directories).
-r - enables recursive retrieval. See Recursive Download for more information.
-P - sets the directory prefix where all files and directories are saved to.
-A - sets a whitelist for retrieving only certain file types. Strings and patterns are accepted, and both can be used in a comma separated list (as seen above). See Types of Files for more information.

man

man - MANual

Links:


https://ravesli.com/bazovye-komandy-v-linux-for-beginners/
https://ravesli.com/uroki-po-linux/
https://ravesli.com/fun-linux-commands/
Thanks for your attention :)