Skip to main content

Posts

Showing posts with the label cheatsheet

keytool cheatsheet

elasticsearch cheatsheet (REST)

linux bash scripting cheatsheet

if statement

linux cheatsheet

Linux Cheatsheet Users management History Network Permissions Redirection Network sniffer systemd text manipulation - awk and sed System info What How name of host hostname FQDN of host hostname -A IP address of host hostname -i memory usage free -h Linux flavor cat /etc/*-release cat /proc/version lsb_release -a disk usage df -h folders size du -ah total disk usage off the current directory du -sh History tool What How Run last command starting with abc !abc Print last command starting with abc !abc:p Last argument of previous command !$ Search history CONTROL-R All arguments of last command !* First argument of last command !^ Take second argument of last cp command ls -l !cp:2 Network netstat man page netstat examples View Only Established Connection netstat -natu | grep 'ESTABLISHED' -a = Show both listening and non-listening (for TCP this means established...

systemd

SystemD cheatsheet systemd is a system and service manager for Linux, compatible with SysV .  Overview of systemd for RHEL 7   Understanding and administering Systemd What Command service foobar start systemctl start foobar sservice foobar stop systemctl stop foobar service foobar status systemctl status foobar.service Listing dependencies: To see dependencies of a service systemctl list-dependencies nfs-server.service loaded services systemctl -t service installed services: systemctl list-unit-files -t service check for services in failed state systemctl --state failed

vi tips and shot cheatsheet

What How mark place in a ma goto a Start of line 0 End of line $ Copy current line yy Copy 5 lines 5yy Paste p P - before line Copy to a named buffer ayy  - name is a' Paste name buffer app Delete till a character X dfX

elasticsearch installation cheatsheet

SystemD cheatsheet: systemd is a system and service manager for Linux, compatible with SysV.  Overview of systemd for RHEL 7  Understanding and administering Systemd What Command service foobar start systemctl start foobar sservice foobar stop systemctl stop foobar service foobar status systemctl status foobar.service Listing dependencies: To see dependencies of a service systemctl list-dependencies nfs-server.service

docker cheatsheet

Short docker commands list (in table view): Images What How List local images docker images Delete local image docker rmi NAME Download image docker image pull NAME Create container from image (detached) docker run –d … Display information on image docker image inspect hpsoftware/almoctane Containers What How List of running docker containers docker ps List all docker containers (running and stopped) docker ps -a Start existing container docker start ID Stop contianer docker stop ID Create container, start it and get a shell inside of it docker run -it IMAGE bash Run a command inside of an already running container docker exec -it ID bash Delete container docker rm ID Get log docker logs ID Other What How Create virtual network docker create network octane_nw Start docker service systemctl start docker Define proxy mkdir -p /etc/systemd/system/docker.service.d vi /etc/systemd/system/docke...

RPM cheatsheet

RPM is the Linux deployment tool. But how to use it? What How Files in RPM package rpm -qpl XX.rpm List scripts rpm -qp --scripts XX.rpm Install rpm rpm -ivh XX.rpm Update rpm rpm -Uvh XX.rpm Installed packages rpm -qa Information on specific installation rpm -qi PACKAGE Uninstall package rpm -e XX sd