Idan SHM - Linux Cheat Sheet Centos Fedora Based
Idan SHM - Linux Cheat Sheet Centos Fedora Based
man <Command> Show manual for the command cd <Path> Change directory
info <Command> Show wide info about the command (Can be pwd Present/print working directory
secondary to man)
ls List directory contents
<Command> --help Short command/tool usage
ls -la Long list directory contents
and hidden files and wide info
System info
find /home/user -name '*.txt' Search and print
uname -a Show system and kernel version all the .txt files
under the user directory
history Show current user bash commands history
mount show or mount filesystems
date Show current date and time
umount unmount file systems
cal Show calendar
sudo userdel -rf <Username> Delete user ( Including the home directory
)
sudo usermod -aG <Group> <User> Add user to group Delete character
i Insert text
a append text
IO Redirection
dw Delete word
cmd < file Input to cmd from file
d$ Delete to the end of the line
cmd1 <(cmd2) Output of cmd2 as file input to cmd1
0 (Zero) Move to the start of the line
cmd > file stdout of cmd to file
2w Jump 2 words
cmd > /dev/null Discard stdout of cmd
d2w Delete 2 words
cmd >> file Append stdout to file
dd Delete a whole line
cmd 2> file stderr of cmd to file
2dd Delete 2 whole lines
cmd 1>&2 stdout to same place as stderr
u Undo previous actions
cmd 2>&1 stderr to same place as stdout
U Undo all the changes on a line
cmd &> file Every output of cmd to file
CTRL-R Undo the undo's
cmd = Command
r Replace character
stdout = Standard output
stderr = Error output
Package management
dnf search <Package> Search package details for the given string
Networking