Basics Flashcards
Essential commnds (119 cards)
get the HTTP headers for https://foo.com
curl -I foo.com
get the HTML for foo.com and follow any redirects
curl -L foo.com
create a udp connection listening on 127.0.0.1 port 3333
nc -luv 127.0.0.1 -p 3333
create a udp connection to 127.0.0.1 on port 3333 in order to send/receive raw data
nc -uv 127.0.0.1 3333
scan ports 100-200 on localhost and return the available services
nmap -sV -p 100-200 127.0.0.1
open an ssl connection to localhost port 12345
openssl s_client -connect localhost:12345
securely upload file foo.txt to remote location bar.com/fubar as user foo
rsync -chavez ssh foo.txt foo@bar.com/fubar/
securely download file from location bar.com/fubar/foo.txt to directory “fubar”
rsync -chavez ssh foo@bar.com/fubar/foo.txt /fubar
SSH in as “foo” into “bar.com” on port 2222 using key fubar.sshkey
ssh foo@bar.com -i fubar.sshkey
SSH in as “foo” into “bar.com” on port 2222
ssh foo@bar.com -p 2222
SSH in as “foo” into “bar.com” on port 2222 disabling the pseudo-terminal
ssh foo@bar.com -p 2222 -T
SSH add key named “foo” to auto login
ssh-add foo
SSH create a ssh key pair
ssh-keygen -t rsa -b 4096
display free disk space in human readable format
df -h
environment
env
help for foo
foo -help
show group memberships
groups
manual for foo
man foo
present working directory
pwd
show system & kernel
uname -a
who is logged in
w
show effective user id
whoami
list directory contents
ls
List directory content one entry per line
ls -1