Terminal / Command Prompt

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

tracert

C:\Users\juapinyo>tracert

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]

[-R] [-S srcaddr] [-4] [-6] target_name

Options:

-d Do not resolve addresses to hostnames.

-h maximum_hops Maximum number of hops to search for target.

-j host-list Loose source route along host-list (IPv4-only).

-w timeout Wait timeout milliseconds for each reply.

-R Trace round-trip path (IPv6-only).

-S srcaddr Source address to use (IPv6-only).

-4 Force using IPv4.

-6 Force using IPv6.

<p>C:\Users\juapinyo&gt;tracert</p><p>Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]</p><p>               [-R] [-S srcaddr] [-4] [-6] target_name</p><p>Options:</p><p>    -d                 Do not resolve addresses to hostnames.</p><p>    -h maximum_hops    Maximum number of hops to search for target.</p><p>    -j host-list       Loose source route along host-list (IPv4-only).</p><p>    -w timeout         Wait timeout milliseconds for each reply.</p><p>    -R                 Trace round-trip path (IPv6-only).</p><p>    -S srcaddr         Source address to use (IPv6-only).</p><p>    -4                 Force using IPv4.</p><p>    -6                 Force using IPv6.</p><p></p>
2
New cards

nslookup

C:\Users\juapinyo>nslookup

Default Server: P00HAWDIRDC001.corp.tmnas.com

Address: 10.111.200.11

C:\Users\juapinyo>nslookup google.com

Server: P00HAWDIRDC001.corp.tmnas.com

Address: 10.111.200.11

Non-authoritative answer:

Name: google.com

Addresses: 2607:f8b0:4006:824::200e

142.250.65.174

3
New cards

ipconfig

C:\Users\juapinyo>ipconfig

Windows IP Configuration

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : corp.tmnas.com

Link-local IPv6 Address . . . . . : fe80::d1fa:17fc:435f:105d%14

IPv4 Address. . . . . . . . . . . : 10.110.2.4

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 10.110.2.1

4
New cards

ping

C:\Users\juapinyo>ping

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]

[-r count] [-s count] [[-j host-list] | [-k host-list]]

[-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]

[-4] [-6] target_name

Options:

-t Ping the specified host until stopped.

To see statistics and continue - type Control-Break;

To stop - type Control-C.

-a Resolve addresses to hostnames.

-n count Number of echo requests to send.

-l size Send buffer size.

-f Set Don't Fragment flag in packet (IPv4-only).

-i TTL Time To Live.

-v TOS Type Of Service (IPv4-only. This setting has been deprecated

and has no effect on the type of service field in the IP

Header).

-r count Record route for count hops (IPv4-only).

-s count Timestamp for count hops (IPv4-only).

-j host-list Loose source route along host-list (IPv4-only).

-k host-list Strict source route along host-list (IPv4-only).

-w timeout Timeout in milliseconds to wait for each reply.

-R Use routing header to test reverse route also (IPv6-only).

Per RFC 5095 the use of this routing header has been

deprecated. Some systems may drop echo requests if

this header is used.

-S srcaddr Source address to use.

-c compartment Routing compartment identifier.

-p Ping a Hyper-V Network Virtualization provider address.

-4 Force using IPv4.

-6 Force using IPv6.

5
New cards

netstat

C:\Users\dogxray01>netstat

Active Connections

Proto Local Address Foreign Address State

TCP 127.0.0.1:49969 DESKTOP-6UNN5TB:49970 ESTABLISHED

TCP 127.0.0.1:49970 DESKTOP-6UNN5TB:49969 ESTABLISHED

TCP 127.0.0.1:49974 DESKTOP-6UNN5TB:49975 ESTABLISHED

TCP 127.0.0.1:49975 DESKTOP-6UNN5TB:49974 ESTABLISHED

6
New cards

arp

C:\Users\dogxray01>arp

Displays and modifies the IP-to-Physical address translation tables used by

address resolution protocol (ARP).

ARP -s inet_addr eth_addr [if_addr]

ARP -d inet_addr [if_addr]

ARP -a [inet_addr] [-N if_addr] [-v]

-a Displays current ARP entries by interrogating the current

protocol data. If inet_addr is specified, the IP and Physical

addresses for only the specified computer are displayed. If

more than one network interface uses ARP, entries for each ARP

table are displayed.

-g Same as -a.

-v Displays current ARP entries in verbose mode. All invalid

entries and entries on the loop-back interface will be shown.

inet_addr Specifies an internet address.

-N if_addr Displays the ARP entries for the network interface specified

by if_addr.

-d Deletes the host specified by inet_addr. inet_addr may be

wildcarded with * to delete all hosts.

-s Adds the host and associates the Internet address inet_addr

with the Physical address eth_addr. The Physical address is

given as 6 hexadecimal bytes separated by hyphens. The entry

is permanent.

eth_addr Specifies a physical address.

if_addr If present, this specifies the Internet address of the

interface whose address translation table should be modified.

If not present, the first applicable interface will be used.

Example:

> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.

> arp -a .... Displays the arp table.

<p>C:\Users\dogxray01&gt;arp</p><p>Displays and modifies the IP-to-Physical address translation tables used by</p><p>address resolution protocol (ARP).</p><p>ARP -s inet_addr eth_addr [if_addr]</p><p>ARP -d inet_addr [if_addr]</p><p>ARP -a [inet_addr] [-N if_addr] [-v]</p><p>  -a            Displays current ARP entries by interrogating the current</p><p>                protocol data.  If inet_addr is specified, the IP and Physical</p><p>                addresses for only the specified computer are displayed.  If</p><p>                more than one network interface uses ARP, entries for each ARP</p><p>                table are displayed.</p><p>  -g            Same as -a.</p><p>  -v            Displays current ARP entries in verbose mode.  All invalid</p><p>                entries and entries on the loop-back interface will be shown.</p><p>  inet_addr     Specifies an internet address.</p><p>  -N if_addr    Displays the ARP entries for the network interface specified</p><p>                by if_addr.</p><p>  -d            Deletes the host specified by inet_addr. inet_addr may be</p><p>                wildcarded with * to delete all hosts.</p><p>  -s            Adds the host and associates the Internet address inet_addr</p><p>                with the Physical address eth_addr.  The Physical address is</p><p>                given as 6 hexadecimal bytes separated by hyphens. The entry</p><p>                is permanent.</p><p>  eth_addr      Specifies a physical address.</p><p>  if_addr       If present, this specifies the Internet address of the</p><p>                interface whose address translation table should be modified.</p><p>                If not present, the first applicable interface will be used.</p><p>Example:</p><p>  &gt; arp -s 157.55.85.212   00-aa-00-62-c6-09  .... Adds a static entry.</p><p>  &gt; arp -a                                    .... Displays the arp table.</p><p></p>
7
New cards

route

C:\Users\dogxray01>route

Manipulates network routing tables.

ROUTE [-f] [-p] [-4|-6] command [destination]

[MASK netmask] [gateway] [METRIC metric] [IF interface]

-f Clears the routing tables of all gateway entries. If this is

used in conjunction with one of the commands, the tables are

cleared prior to running the command.

-p When used with the ADD command, makes a route persistent across

boots of the system. By default, routes are not preserved

when the system is restarted. Ignored for all other commands,

which always affect the appropriate persistent routes.

-4 Force using IPv4.

-6 Force using IPv6.

command One of these:

PRINT Prints a route

ADD Adds a route

DELETE Deletes a route

CHANGE Modifies an existing route

destination Specifies the host.

MASK Specifies that the next parameter is the 'netmask' value.

netmask Specifies a subnet mask value for this route entry.

If not specified, it defaults to 255.255.255.255.

gateway Specifies gateway.

interface the interface number for the specified route.

METRIC specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database

file NETWORKS. The symbolic names for gateway are looked up in the host name

database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,

(wildcard is specified as a star '*'), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only

matching destination routes are printed. The '*' matches any string,

and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, 224.

Pattern match is only allowed in PRINT command.

Diagnostic Notes:

Invalid MASK generates an error, that is when (DEST & MASK) != DEST.

Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1

The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination.

Examples:

> route PRINT

> route PRINT -4

> route PRINT -6

> route PRINT 157* .... Only prints those matching 157*

> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2

destination^ ^mask ^gateway metric^ ^

Interface^

If IF is not given, it tries to find the best interface for a given

gateway.

> route ADD 3ffe::/32 3ffe::1

> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

CHANGE is used to modify gateway and/or metric only.

> route DELETE 157.0.0.0

> route DELETE 3ffe::/32

8
New cards

curl

C:\Users\dogxray01>curl --help

Usage: curl [options...] <url>

-d, --data <data> HTTP POST data

-f, --fail Fail fast with no output on HTTP errors

-h, --help <category> Get help for commands

-i, --include Include protocol response headers in the output

-o, --output <file> Write to file instead of stdout

-O, --remote-name Write output to a file named as the remote file

-s, --silent Silent mode

-T, --upload-file <file> Transfer local FILE to destination

-u, --user <user:password> Server user and password

-A, --user-agent <name> Send User-Agent <name> to server

-v, --verbose Make the operation more talkative

-V, --version Show version number and quit

This is not the full help, this menu is stripped into categories.

Use "--help category" to get an overview of all categories.

For all options use the manual or "--help all".