-
Notifications
You must be signed in to change notification settings - Fork 0
Setup and Terminal
Welcome to the Setup Page!
Why? The terminal is a crucial tool in computing. Whether you are doing security or general software development, learning how to use the terminal is crucial. This tutorial will show how to get a UNIX terminal.
Windows Subsystem for Linux (WSL) is a windows feature that allows you to run a linux environment on your windows computer.
To install:
- Open Microsoft Store
- Search Ubuntu
- Install Ubuntu (the one without numbers)
If you get an error try this:
- Open
cmd
as administrator - run
wsl --install
- restart your computer
Mac has a built in terminal, but there are a few programs you can get to make it better.
"brew" is a package manager. A package manager is a program that allows you to easily download and manage software.
To install tools with brew, use brew install <package>
.
A virtual machine allows you to emulate a different operating system. This way you can have a Linux Operating system, while your main machine is a different operating system.
I recommend downloading VMware Fusion
(MacOS) or VMware Workstation Player
(Windows). If you are a student you can get a license for free!.
You can then install a Ubuntu (Linux) image on your Hypervisor. (if you are running on an ARM chip you need to get an image for the ARM architecture which you can also find here
the most important skill you have to learn is how to traverse the filesystem.
The cd
or Change Directory command allows you to change your current working directory.
Your filesystem might look like this:
/
├── dirA
│ ├── dirC
│ │ └── file1.txt
│ └── file1.txt
└── dirB
├── file1.txt
└── file2.txt
In the following example
|
v
represents your current working directory.
cd /
|
v
/
├── dirA
│ ├── dirC
│ │ └── file1.txt
│ └── file1.txt
└── dirB
├── file1.txt
└── file2.txt
cd dirB
/
├── dirA
│ ├── dirC
│ │ └── file1.txt
│ └── file1.txt
| |
| v
└── dirB
├── file1.txt
└── file2.txt
cd ..
|
v
/
├── dirA
│ ├── dirC
│ │ └── file1.txt
│ └── file1.txt
└── dirB
├── file1.txt
└── file2.txt
cd dirA/dirC
/
├── dirA |
| | v
│ ├── dirC
│ │ └── file1.txt
│ └── file1.txt
└── dirB
├── file1.txt
└── file2.txt
There are some special things you need to know.
-
..
represents your parent directory. -
.
represents your current directory.
The absolute path always starts at /
.
ex: /dirA/dirC/file1.txt
relative paths start at your current workind directory
ex: dirC/file1.txt (starting at dirA)
ls <directory>
: lists files in your current or specified directory
mv <source> <dest>
: move file from source to destination
rm <file>
: remove file. Not Reversible.
cat <file>
: print contents of file
./file
: execute a file
man <command>
: show the manual pages of a command
nc <ip> <port>
: connect to ip on port
ssh <user@ip> <port>
: secure remote shell. connect to ip as user
ping <ip>
: see if an IP address is up using ICMP
curl <url>
: network access tool to access websites through the terminal
wget <url>
: download file at url.
Play the bandit wargame at overthewire.
You can connect to the first level by:
ssh [email protected] -p 2220