Ass 1
Ass 1
1. pwd Command
2. cd Command
3. ls Command
4. rm Command
5. mv Command
6. cat Command
7. cmp Command
8. cp Command
9. echo Command
22. ln Command
1. top Command
2. ps Command
Common Options:
- -e or -A: Displays all processes. - -f: Provides a full-format listing with additional details.
- -u [user]: Shows processes for a specific user. - -aux: A commonly used combination
that displays all processes with detailed information.
3. kill Command
Common Signals:
4. nice Command
Common Options:
- -n [priority]: Sets the priority of the process. The priority value ranges from -20
(highest priority) to 19 (lowest priority). - -n is followed by a number that indicates the
priority level, e.g., nice -n 10 command starts command with a niceness of 10.
1. Ping Command
Example:
ping google.com
2. ifconfig Command
Example:
ifconfig eth0
3. netstat Command
● Purpose: Displays network connections, routing tables, interface statistics, protocol
statistics, and more.
● Usage: netstat [options]
● Description: Provides a snapshot of network activity, including active connections,
listening ports, and routing table information.
Example:
netstat -anp
4. nslookup Command
Example:
nslookup google.com
5. telnet Command
Note: Telnet is generally insecure due to plain text transmission. It's often replaced by SSH
for secure remote access.
Example:
telnet google.com 80
6. traceroute Command
Example:
traceroute google.com
2. Explore Features of vi Editor
Basic Modes of vi
Insert Mode
Visual Mode
Command-Line Mode
Basic Operations in vi
Editing
● Insert Text:
○ i: Insert before the cursor.
○ I: Insert at the beginning of the line.
○ a: Append after the cursor.
○ A: Append at the end of the line.
○ o: Open a new line below the current line.
○ O: Open a new line above the current line.
● Delete Text:
○ x: Delete the character under the cursor.
○ dd: Delete the current line.
○ d[number]d: Delete multiple lines.
● Copy and Paste:
○ yy: Copy (yank) the current line.
○ p: Paste the copied content after the cursor.
○ P: Paste the copied content before the cursor.
● Undo and Redo:
○ u: Undo the last action.
○ Ctrl+r: Redo the last undone action.