Skip to main content

Posts

Showing posts from May, 2018

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