Skip to main content

Posts

Showing posts from May, 2018

linux cheatsheet

Linux CheatsheetUsers management
History
Network
Permissions
Redirection
Network sniffer
systemd
text manipulation - awk and sed
System infoWhatHowname of hosthostnameFQDN of hosthostname -AIP address of hosthostname -imemory usagefree -hLinux flavorcat /etc/*-release
cat /proc/version
lsb_release -adisk usagedf -hfolders sizedu -ahtotal disk usage off the current directorydu -shHistory toolWhatHowRun last command starting with abc!abcPrint last command starting with abc!abc:pLast argument of previous command!$Search historyCONTROL-RAll arguments of last command!*First argument of last command!^Take second argument of last cp commandls -l !cp:2Network netstat man page
netstat examples

View Only Established Connectionnetstat -natu | grep 'ESTABLISHED'
-a = Show both listening and non-listening (for TCP this means established connections) sockets
-t = tcp
-u = tudp
-n = Show numerical addresses instead of trying to determine symbolic hostListing all the LISTENING Ports of TCP and UDP conn…

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

WhatCommand 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