Skip to content

Instantly share code, notes, and snippets.

@AlejandroPerezMartin
Last active August 29, 2015 14:16
Show Gist options
  • Save AlejandroPerezMartin/45b34bc2b89afd6cb7fd to your computer and use it in GitHub Desktop.
Save AlejandroPerezMartin/45b34bc2b89afd6cb7fd to your computer and use it in GitHub Desktop.
Unix terminal commands
#!/bin/bash
! # Start a history substitution
!$ # Refer to the last argument in a line
!string # Refer to the most recent command starting with string
# example
echo !$
# Network
curl
traceroute
iptraf
netstat
# /etc/network/interfaces
# Text manipulation
sed
awk
uniq
wc
split
tee
head
less
tail
# regular expressions: . (match any single char), a|z (match a or z), $ (match end of string), *
# require boot loader password
grub-md5-crypt # encrypt a password
gedit /boot/grub/grub.conf # and add the following line with the password from grub-md5-crypt
# password --md5 $1$Wnvo.1$qz781HRVG4jUnJXmdSCZ30 <-- password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment