J6KAo

      1. The first rule of a blind tightrope walker*: do not turn off

      2. To all horse riders: a run without blinders is prosecuted.

      *) blind tightrope dancer job is based on other rules.

### QUICK LINUX

  Themes

    Install
    Use
    Daemons
    Diagnostics


## INSTALL

  1. Install OS
  2. Installing from the repository (apt, yum, dnf, pacman, pkg ..)
  3. Installing from package (dpkg/deb, rpm/rpm, pacman/tar.gz)
  4. Install from source (./configure, make, make install)
  5. Manual installation (gcc, g++, mv, rm)


## USE

LPI Linux LPIC-1 101 and CompTIA Linux+

  01 - LPIC1 & CompTIA Linux + Intro
  02 - Hardware Settings
  03 - Boot the System
  04 - Change Runlevels and Reboot or Shutdown the System
  05 - Design Hard Disk Layout
  06 - Install a Boot Manager
  07 - Manage Shared Libraries
  08 - Debian Package Management
  09 - RPM & YUM Package Management
  10 - Work on the Command Line
  11 - Process Text Streams Using Filters
  12 - Perform Basic File Management
  13 - Use Streams, Pipes, and Redirects
  14 - Create, Monitor, and Kill Processes
  15 - Process Priorities
  16 - Search Text Files with Regular Expressions
  17 - Perform Basic File Editing Operations With vi
  18 - Create Partitions and Filesystems
  19 - Maintain the Integrity of Filesystems
  20 - Control Mounting and Unmounting of Filesystems
  21 - Manage Disk Quotas
  22 - Manage File Permissions and Ownership
  23 - Create, Change, and Symbolic Links
  24 - Find the Files Files and Place in the Correct Location


## DEMONS

# III Ways to work with demons

States of demons:

   not-found
   loaded
   enabled
   disabled
   started
     active running
     active exited
   stopped
     inactive dead

1. Through scripts in /etc/init.d

  # for each in /etc/init.d/*; do $ each status; done | grep -B1 Active

2. The service and chkconfig commands

  # chkconfig --list
  # chkconfig httpd on
  # chkconfig rsync off
  # service --status-all
      start stop restart status

3. SystemD

  # systemctl (enable|disable|start|stop|restart|status) service_name
  # systemctl list-units --type service --all | grep 'loaded'
  # systemctl stop syslog.socket rsyslog.service

4. Build simple Daemon as in "J3VKW-SimpleDaemon.txt" and control it using technique shown in pp.1-3


## DIAGNOSTICS

1. Collect system data ( facter ( apt, dnf, pacman))

   Hardware
   OS
     build report about distribution
     build report about active settings

2. Search for information and exchange information in text files.

   find and grep

   nano, cat and ed (in case of problems with the nano such as "cannot insert a piece of text correctly")

   mc (menu -> command -> find file)

   mc as shell: stay in the directory when exiting

    find / usr -name mc.sh
    cat /usr/lib/mc/mc.sh
    cp /usr/lib/mc/mc.sh /etc/profile.d/
    relogin now

   mcedit copy-paste *1

     copy into mcedit: ctrl+insert
     paste from mcedit: shift+select with mouse

   filtrate information using pipes

     pipes, redirects, regular expressions
     tools: grep, sed, awk
     file formats: ini/conf, xml, json
     working with binary data in systemd-journald, journalctl
     work with data in SQL tables. Virtual tables CREATE VIEW ..

3. Installation problems

     apt, dnf,.. yum. Configuring mirrors and plugins.

     Lack of packages or cache damage during installation:
       dpkg, rpm, gdebi ..

     searching for missing packages when installing from source:
       autogen, ./configure, make.

4. Repair systems in use (töökäigus systeemide remont)

   Script, local application (run from user account), service (autorun)
   fg, bg, jobs, service/chkconfig, systemctl
   Troubleshooting scripts, applications, and daemons.
   Profiling and monitoring
     profiling (time, top),
     monitoring - log to free console, to file, to window (X11).
   Traffic problems between the server and clients

5. Destruction and recycling

   Free disk space, configuration changes:
     du, df, mount, fdisk, fsck, mkfs, dd.
   LVM,
   vboxmanage
   brute shutdown problems:
    shutdown, reboot, init N, VirtualBox ACPI shutdown,
    sleep and hibernation without a paging file, ..


# LINKS

* 1) Copy and paste text in midnight commander (MC) via putty in Linux

  https://superuser.com/questions/884245
    / copy-and-paste-text-in-midnight-commander-mc-via-putty-in-linux

