Skip to content

Latest commit

 

History

History
463 lines (416 loc) · 26 KB

cix-main.org

File metadata and controls

463 lines (416 loc) · 26 KB

CIX

Comprehensive Inspiration of uniX

Intro

The main purpouse of the project to collect templates, oneliners, examples in one place.

Man pages common sections.

ALLOVERLINUXSOLARISBSDHP-UXAIX
0Header f
0pHeader f (POSIX)
111111General cmd
1pGeneral cmd (POSIX)
222222Systems calls
33333C lib fun
3nNetwork fun
3pPerl mod
447474Special file
554545File formats
6666-6Games
77557misc
881m81m8Maintaince cmd
9999--Oscure kernel specs and interfaces
lLocal documentation
nNew manpages
--9-HP-UX general information

Basic

For example, you know the command but not sure about package where it goes from

what package $CMD belongs to

on GNU/Linux

~$ CMD="ls"
~$ rpm -qf $(which "$CMD")       # ReadHad derived
~$ dpkg-query -S $(which "$CMD") # Debian derived

on BSD

~$ CMD="ls"
~$ pkg which $(which "$CMD")

And oposite situation, you want to find out what commands are in the package

get a list of commands belong to a $PACK

on GNU/Linux

~$ PACK="coreutils"
~$ whatis $(rpm -ql "$PACK" | grep -oP "(?<=in/).+")  # with short description
~$ rpm -ql "$PACK" | grep -P "(?<=in/).+"             # path to command
~$ dpkg-query -L "$PACK" | grep -oP "(?<=in/).+"      # Debian dirived

Index

Make each program do one thing well

<package-name><link><description>
  • Legacy Keep the history
    hall of fame
    who made it posible!
    unix land
    common unix commands.
  • Core Usually it contains on the most distributions
    [bsd]
    list of common BSD commands:
    busybox
    the swiss army knife of embedded Linux: GNU/Linux FreeBSD
    coreutis
    basic file, shell and text manipulation utilities: GNU/Linux FreeBSD HP-UX AUX
    kbd
    tools for configuring the console: GNU/Linux
    man-db
    tools for searching and reading man pages: GNU/Linux
    ncurses
    terminal-independent method of updating character screens: GNU/Linux FreeBSD UNIX OS-X NetBSD
    the heirloom project
    traditional implementations of standard UNIX utils: SanOS
    toybox
    common Linux commands for embedded systems (POSIX-2008 and LSB 4.1): GNU/Linux Android
    util-linux
    is a standard package of the Linux operating system: GNU/Linux
  • File Everything is a file
    diffutils
    a GNU collection of diff utilities: GNU/Linux
    emacs
    GNU Emacs text editor: GNU/Linux
    file
    a utility for determining file types: GNU/Linux NetBSD FreeBSD OS/2 OS-X DOS Windows
    gawk
    the GNU version of the AWK text processing utility: GNU/Linux
    less
    a text file browser similar to more, but better: GNU/Linux UNIX OS-X
    lsof
    a utility which lists open files on *nix systems: GNU/Linux FreeBSD OS-X Solaris
    micro
    a modern and intuitive terminal-based text editor: GNU/Linux OS-X Windows
    nano
    a small text editor: GNU/Linux
    sed
    a GNU stream text editor: GNU/Linux
    vim
    recent enhancements of vim: FreeBSD GNU/Linux OS-X
  • Transfare-sync Put me up, put me down
    curl
    a utility for getting files from remote servers: AIX AmigaOS BeOS DOS DragonFly-BSD FreeBSD HP-UX Haiku GNU/Hurd IRIX GNU/Linux OS-X MiNT MINIX NetBSD NetWare Nexenta OS/2 OpenBSD Plan9 QNX RISC-OS Solaris Syllable Tru64-UNIX UnixWare VMS Windows z/OS
    lsyncd
    live syncing daemon synchronizes local directories with remote targets: GNU/Linux
    rsync
    a program for synchronizing files over a network: FreeBSD GNU/Linux Windows
    vsftpd
    very secure ftp daemon: GNU/Linux
    wget
    a utility for retrieving files using the http or ftp protocols: GNU/Linux Windows OS-X OpenVMS HP-UX MorphOS AmigaOS
    tym
    Time rSync Machine: OS-X
  • Filesystem Partitions, filesystem craft and check
    acl
    access control list utilities:
    autofs
    a tool for automatically mounting and unmounting filesystems
    bindfs
    fuse filesystem to mirror a directory
    btrfs-progs
    userspace programs for btrfs.
    curlftpfs
    is a fs for accessing ftp hosts based on fuse and libcurl
    e2fsprogs
    filesystem utilities for use with ext2/3/4
    glusterfs
    distributed file system: GNU/Linux FreeBSD NetBSD OpenSolaris OS-X
    lvm2
    userland logical volume management tools
    nfs
    utilities for rall out NFS share
    parted
    the GNU disk partition manipulation program: GNU/Linux
    quota
    system tools for monitoring users disk usage
    [xfs]
    [zfs]
  • Utillities Be silent and help ppls
    [likwid]
    [ohai]
    [psacct]
    elfutils
    collection of utilities and DSOs to handle ELF files and DWARF data
    facter
    Command and ruby library for gathering system information:
    moreutils
    tools that nobody thought to write when unix was young:
    parallel
    shell tool for executing jobs in parallel
    pax-utils
    ELF utils that can check files for security relevant properties
    pm-utils
    suspend and powerstate setting framework
    procps-ng
    utilities for monitoring your system and its processes
    psmisc
    is a set of small utilities that use the proc filesystem.
    shadow-utils
    utilities for managing accounts and shadow password files
    vmtouch
    Portable file system cache diagnostics and control
  • System-stats-monitoring Keep an Eye on Me
    blktrace
    utilities for performing block layer io tracing in the linux: GNU/linux
    circus
    a process & socket manager built with zmq:
    supervisor
    A System for Allowing the Control of Process State on UNIX: GNU/Linux OS-X Solaris FreeBSD
    sysstat
    collection of performance monitoring tools: GNU/Linux
    smem
    report application memory usage in a meaningful way:
  • Hardware Hard as a rock!
    iw
    A nl80211 based wireless configuration tool: GNU/Linux
    dmidecode
    tool to analyse bios dmi data: GNU/Linux FreeBSD NetBSD OpenBSD BeOS Solaris Haiku
    lshw
    hardware lister: GNU/Linux
    OProfile
    System wide profiler: GNU/Linux
    pciutils
    pci bus related utilities: FreeBSD NetBSD OpenBSD GNU/Linux FreeBSD Solaris/i386 AIX GNU/Hurdd Windows Cygwin BeOS Haiku Darwin
    smartmontools
    tools for monitoring smart capable hard disks: OS-X GNU/Linux FreeBSD NetBSD OpenBSD Solaris OS/2 Cygwin QNX eCmStation Windows
    stress
    A tool to put given subsystems under a specified load: GNU/Linux Gentoo OpenBSD FreeBSD
    stress-ng
    stress test a computer system in various ways: GNU/Linux GNU/Hurd FreeBSD OpenBSD NetBSD FreeBSD MINIX OpenIndiana
    usbutils
    Linux usb utilities: GNU/Linux
    flashrom
    simple program for reading/writing flash chips content: GNU/Linux DOS Linux FreeBSD NetBSD OpenBSD DragonFlyBSD Solarise OS-X GNU/Hurd
  • Searching Loosing my religion
    ack
    grep-like text finder
    ag
    super-fast text searching tool - The Silver Searcher
    fdupes
    finds duplicate files in a given set of directories
    findutils
    the GNU versions of find utilities (find and xargs): GNU/Linux
    grep
    pattern matching utilities: GNU/Linux
    jq
    command-line json processor: OS-X FreeBSD Solaris GNU/Linux Windows
    mlocate
    an utility for finding files by name: GNU/Linux
    pcre-tools
    auxiliary utilities for pcre: GNU/Linux
    ripgrep
    rg combines the usability of The Silver Searcher with the raw speed of grep.
    sift
    A fast and powerful alternative to grep: OS-X GNU/Linux
    ucg
    extremely fast grep-like tool specialized for searching large bodies of source code.
  • Compress-archive I’m a pac man
    bzip2
    a file compression utility
    cpio
    a GNU archiving program
    tar
    a file archiving program: GNU/Linux
    gzip
    the GNU data compression program
    unzip
    a utility for unpacking zip files
    lrzip
    compression program optimized for large files
    pax
    POSIX file system archiver
    xz
    lzma compression utilities: GNU/Linux FreeBSD
    sharutils
    shar utilities for packaging and unpackaging shell archives: GNU/Linux
  • Networking We all live in the someone’s subnet in
    bind-utils
    utilities for querying dns name server
    bridge-utils
    utilities for configuring the Linux ethernet bridge
    hping
    a command-line oriented TCP/IP packet assembler/analyzer: GNU/Linux FreeBSD NetBSD OpenBSD Solaris OS-X Windows
    inetutils
    a collection of common network programs
    iproute2
    routing commands and utilities
    iptables
    Linux kernel packet filtering capabilities: GNU/Linux
    iputils
    network monitoring tools including ping: GNU/Linux
    ncat
    general-purpose network connector (nmap’s project netcat replacement:
    net-snmp
    a collection of snmp protocol tools and libraries: GNU/Linux FreeBSD OpenBSD Solaris/SPARC OS-X AIX HP-UX NetBSD OSF SunOS Ultrix QNX Dynix IRIX Windows
    net-tools
    collection of base networking utilities
    netcat
    a TCP/IP swiss army knife for networking: DOS ULTRIX SunOS Solaris AIX GNU/Linux IRIX OSF NetBSD HP-UX AUX NeXT
    netperf
    TCP/UDP/sockets/etc performance benchmark: FreeBSD AIX Solaris GNU/Linux HP-UX IRIX
    nmap
    network exploration tool and security scanner
    OpenSSH
    an open source implementation of ssh protocol: AIX HP-UX IRIX GNU/Linux Next Sco Sni/Reliant Unix Solaris Digital Unix/Tru64/Osf Mac Os-X Cygwin
    scapy
    Interactive packet manipulation tool and network scanner: GNU/Linux
    tcpdump
    dump traffic on a network: GNU/Linux FreeBSD
    dsniff
    tools for network auditing and penetration testing: GNU/Linux OpenBSD Solaris
    ipset
    Manage Linux IP sets: GNU/Linux
    iptraf-ng
    a console-based network monitoring utility: GNU/Linux
    + [[./spices/cix-socat.org][socat]] :: bidirectional data relay between two data channels ('netcat++'): =GNU/Linux=
        
    [tshark]
    snort
    [suricata]
    [zink]
  • Shell Not just sand…
    ash
    Almquist SHell in NetBSD
    bash
    GNU bash shell built in commands
    dash
    Small and fast POSIX-compliant shell
    fish-shell
    a friendly interactive shell
    ksh
    KornShell
    screen
    a screen manager that supports multiple logins on one terminal
    tcsh
    An enhanced version of csh, the C shell: FreeBSD
    tmux
    a terminal multiplexer
    zsh
    powerful interactive shell
  • Scheduling-logging World is spinning around
    at
    job spooling tools
    cronie
    cron daemon for executing programs at set times
    logrotate
    rotates, compresses, removes and mails system log files
  • Media Please your eyes and ears
    alsa
    advanced Linux sound architecture (alsa) utilities: GNU/Linux
    ffmpeg
    digital vcr and streaming server
    fontconfig
    font configuration and customization library
    pulseaudio
    pulseaudio sound server utilities
    sox
    a general purpose sound file conversion tool
    ImageMagick
    An X application for displaying and manipulating images
  • Security It’s never be save
    [apparmor]
    is a Mandatory Access Control (MAC)
    [kismet]
    WLAN detector, sniffer and IDS:
    lynis
    security and system auditing tool: GNU/Linux OS-X FreeBSD OpenBSD Solaris AIX HP-UX NetBSD
    openssl
    Utilities from the general purpose cryptography library with TLS implementation
    pam
    an extensible library which provides authentication for applications: AIX DragonFly-BSD FreeBSD HP-UX GNU/Linux OS-X NetBSD Solaris
    [rkhunter]
    [seccomp]
    SElinux
    Security-Enhanced Linux: GNU/Linux
    sudo
    allows restricted root access for specified users
    [yara]
    The pattern matching swiss knife
  • Boot-Init-systems Let’s party started!
    systemd
    a system and service manager
    upstart
    event-based init daemo
    syslinux
    Simple kernel loader which boots from a FAT filesystem: GNU/Linux
    grub2
    Bootloader with support multiboot and more: GNU/Linux
  • Development In the fields of observation chance favors only the prepared mind.
    autoconf
    a GNU tool for automatically configuring source code: GNU/Linux
    automake
    A GNU tool for automatically creating Makefiles: GNU/Linux
    binutils
    collection of binary tools: GNU/Linux
    bison
    A GNU general-purpose parser generator
    cmake
    Cross-platform make system
    ctags
    A C programming language indexing and/or cross-reference tool
    gcc
    various compilers (c, c++, objective-c, java, …): GNU/Linux
    gdb
    a GNU source-level debugger for C, C++, Fortran, Go and other languages
    git
    Fast Version Control System
    glibc
    common binaries and locale data containing the main C library: GNU/Linux
    global
    Source code tag system
    jemalloc
    General-purpose scalable concurrent malloc implementation: GNU/Linux FreeBSD
    libtool
    The GNU Portable Library Tool: GNU/Linux Solaris
    lightning
    library for generating assembly code on run time: GNU/Linux
    llvm
    The Low Level Virtual Machine: OS-X GNU/Linux
    make
    a tool which simplifies the build process for users: GNU/Linux
    musl
    valgrind
    tool for finding memory management bugs in programs: GNU/Linux Solaris Android Darvin
  • Packaging Pack me up, pack me down
    apt
    Debian/Ubuntu commandline package panager.
    aptitude
    is a featureful package manager for debian GNU/Linux systems
    dnf
    fork of yum, using libsolv as a dependency resolve
    dpkg
    package manager for debian
    pacman
    is one of the major distinguishing features of Arch Linux
    pkg/pkgng
    is the Next Generation package management tool for FreeBSD: FreeBSD
    rpm
    package manager is a command line driven package management system
    [guix]
    [nix]
  • Research-reverse-engineering I’ve got a clue
    Linux Netkit
    Utilities for managing processes on your system
    binwalk
    Firmware analysis tool
  • Kernel-traces Go to basic
    kmod
    Linux kernel module management utilities:
    dtrace
    comprehensive dynamic tracing framework: Solaris FreeBSD NetBSD OS-X
    strace
    tracks and displays system calls associated with a running process
    kernel-devel
    development package for building kernel modules to match the kernel
    dkms
    dynamic kernel module support framework
    perf
    performance monitoring for the Linux kernel: GNU/Linux
    [ftrace]
    [ktrace]
    [ltrace]
    [SystemTap]
    [LTTng]
    [ProbeVue]
  • Cryptograpy Who breaks Enigma code?
    gnupg
    A GNU utility for secure communication and data storage
    luks
    Linux Unifed Key Setup
  • Web Are you a spiderman?
    [apache]
    haproxy
    [nginx]
  • Databases
    [postgresql]
    is an advanced Object-Relational database management system: GNU/Linux Win FreeBSD OpenBSD NetBSD OS-X AIX HP-UX Solaris
    [pgcli]
  • Virtualisation

Configuration

Header example of configuration file:

#+conf_url: http://vsftpd.beasts.org/vsftpd_conf.html
#+conf_man: vsftpd.conf.5
#+conf_cmd: /usr/bin/vsftpd
#+conf_path: /etc/vsftpd/vsftpd.conf
#+conf_frmt: option=value
#+conf_re: ^[^#][a-z_]+=(YES|NO|[0-9]*|.*)$
#+conf_total: 125

Libraries

Distribution of most commonly used libraries

Fedora GNU/Linux

 1     2937 libc
 2     1574 libm
 3     1556 libpthread
 4     1546 libdl
 5     1036 libz
 6      993 librt
 7      919 libpcre
 8      915 libgcc_s
 9      778 libselinux
10      685 libresolv
11      631 liblzma
12      551 libcap
13      507 libgpg-error
14      505 libgcrypt
15      495 libffi
16      490 libglib-2
17      488 libuuid
18      479 liblz4
19      465 libsystemd
20      458 libstdc++

FreeBSD


Glosary

discriptor
DMI
Desktop Management Interface
HIDS
Host-based intrusion detection system
GID
Globally unique identifier
GUI
Graphical User Interface
CLI
Command Line Interface
TUI
Text-based user interface
GNU
GNU is Not a Unix, it is a collection of many programs: applications, libraries, developer tools, even games. The development of GNU, started in January 1984. https://www.gnu.org
inode
magic number
MBR
BIOS
nice
PID
restricted delition flag
prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the directory
RFC
Request for Comment - official standards in the internet community.
sticky bit
SUS
Single UNIX Specitication
UID
User IDentifier
UUID
Universally Unique Identifier
WWN
World Wide Name - is a unique identifier used in storage technologies.

References

Books

  • Ellen Sieve, Stephen Figgins, Robert Love & Arnold Robbinsp LINUX in a nutshell 6th Edition; O’reilly media, 2009;
  • Evi Nemeth, Garth Snyder, Trent R. Hein, Ben Whaley; UNIX and LINUX System Administration Handbook 4th edition; Prentice Hall, 2013;
  • Arnold Robbins; UNIX in a Nutshell; O’reilly, 2008;
  • Richard Blum; Linux Command Line and Shell Scripting Bible; Wiley Publishing Inc., 2008;
  • Ben Clark; RTFM: Red Team Field Manual; Ben Clark, 2013;

Articles

  • M. Douglas McIlroy; A Research UNIX Reader: Annotated Excerpts from the Programmer’s Manual, 1971-1986;

Links

Wikis

Organisations

Hubs

IRC

  • irc.freenode.org
    • #linux was created on 2001-02-09 23:16:24
    • #emacswas created on 2006-11-26 06:42:33
    • #org-mode was created on 2010-01-30 07:48:24