Intelligence is simply talking to many people

Linux Commands

In Terminal:

REGULAR COMMANDS

  • paste: ctrl-shift-v
  • check disk space: df -h
  • check What is computer (64 or 32): uname -a
  • check What distro is on computer: lsb_release -a
  • view image metadata (with imagemagick):
  • sudo -i to become root (also sudo su?)
  • ls - list
  • cd D and double-tab and it will show you options starting with D
  • echo “Hi!” > text.txt
  • cp text.txt Downloads - move this file to Downloads
  • rm Downloads/test.txt - remove that file
  • mv test.txt Downloads/ - physically move it
  • cd .. cd .. locate bash but it doesn't find anything, so
  • updatedb then try again
  • passwd - to change a password
  • man ls AND ls --help give some info about the command. man is manual.
  • pwd - present working directory
  • cd / - to go to root

usr does not mean user, it means universal system repository (or something).


INTERESTING COMMANDS

  • killall programName ... kills that process (which you might have seen using lots of resources in Terminal)
  • identify -verbose filename.png

GET INFORMATION ABOUT COMPUTER, COMMANDS

  • Find out which desktop environment (DE, for example MATE) you are using: echo $XDG_CURRENT_DESKTOP
  • top: shows RAM usage
  • lsmem: shows how much RAM you have
  • lscpu shows computer specs
  • cat /proc/cpuinfo shows even more specs
  • free -m shows free available RAM details
  • cat /proc/meminfo also
  • sblk shows available disk space
  • df -h
  • sudo dmidecode -t system
  • sudo dmidecode -t bios
  • sudo dmidecode -t processor ... these show BIOS info
  • sudo dmidecode -q will show ALL system info, but a lot
  • more commands for seeing linux sysem info: https://www.how2shout.com/linux/linux-system-info-commands-using-terminal/

USEFUL COMMANDS

  • How to install .sh scripts
  • sh install.sh
  • might have to:
  • chmod +x /path/to/yourscript.sh

YouTube-dl (outdated)

* download mp3 (using youtube-dl): 

youtube-dl -x --audio-format mp3 http:address

* download playlist as mp3s: 

youtube-dl --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist https:address ```


LINUX FOR ETHICAL HACKERS (YouTube course)

chmod +rwx

or just

chmod +x

or

chmod 777 hello.txt

adduser john

cat /etc/passwd

(you will see john at bottom)

cat /etc/shadow

(you can only see hashing format - a tool like hashcat can break that down and crack passwords)

...

(su is switch user)

su john

passwd root (to change root's password, but this does not work. Neither does)

sudo passwd root

(because john is not in the sudoers file)

...

userdel john

(deletes john)

networking terms - brush up for pentesting. You'll have to navigate around networks.

ifconfig (shows different interface types and IP address associated with them)

iwconfig (only usually see if using a laptop)

ping (icmp traffic)

arp -a (show you IP address it talks to and mac address tied to it)

netstat -ano (you can see what's talking) (what that machine is associated with and if it's talking on a port)

route (print your routing table) (tells you where your traffic exits, essentially)

102:00

Comments: 0

Interested to discuss? Leave a comment.

Image




Your email will not be published nor shared with anyone. In your text you can use markdown for marking up *italic*, links <http://example.org> and other elements. These comments are moderated and published manually as soon as possible.