System Processes Flashcards

(100 cards)

1
Q

What command shows real-time CPU, memory, and process usage

A

Top or htop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which command provides memory, cpu and processes statistics at intervals?

A

Vmstat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you display detailed memory usage for each purpose?

A

Smem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command lists all running processes with detailed info?

A

Ps aux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command kills a process using its PID

A

kill PID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you kill all processes with the same name?

A

killall process_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What command finds the PID of a process by name?

A

pgrep process_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command shows processes in a tree-like format?

A

pstree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you check disk space usage for all mounted file systems?

A

df -h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which command shows disk usage of a specific directory?

A

du -sh /path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command monitors disk I/O performance?

A

iostat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you check memory and swap usage?

A

free -h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which command lists memory usage per process with detailed breakdown?

A

smem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command shows system logs from the current boot?

A

journalctl -b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you display kernel and hardware-related messages?

A

dmesg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you view logs for a specific service using systemd?

A

journalctl -u service_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What command tests basic network connectivity by sending ICMP packets?

A

ping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do you trace the path packets take to a network host?

A

traceroute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What command checks network interface configurations (newer)?

A

ip addr show

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How do you list all open network ports and listening services?

A

ss -tuln

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What command resolves DNS records for a domain?

A

dig example.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How do you fetch a web page or test an API endpoint from the command line?

A

curl http://example.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which command tests network bandwidth between two machines?

A

iperf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What command scans for open ports and running services on a host?

A

nmap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How do you check if a port is open on a remote machine using netcat?
nc -zv host port
26
What command changes file permissions?
chmod
27
How do you change ownership of a file?
chown user: group file
28
How do you trace system calls made by a process?
strace -p PID
29
What command shows all kernel parameters?
sysctl -a
30
How do you enable IP forwarding in the kernel?
sysctl -w net.ipv4.ip_forward=1
31
How do you schedule a task to run at a specific time in Linux ?
cron or crontab -e
32
What command shows the last system boot time in Linux ?
uptime
33
What command reboots a Linux system?
sudo reboot
34
How do you display the manual page for a command in Linux ?
man command_name
35
How do you search for a specific string in a file in Linux ?
grep “string” filename
36
How do you create a symbolic link in Linux?
Ln -s target link_name
37
What command displays the IP addresses of network interfaces in Linux?
ip addr show
38
How do you view your system’s IP address in windows ?
ipconfig
39
What command shows the current routing table in Linux ?
ip route
40
How do you view open network connections in windows ?
netstat -an
41
What windows command transfers files over a network using the SMB protocol?
net use
42
How do you download a file from the web in Linux using wget?
wget http://example.com/file.zip
43
How do you securely transfer files using rsync in Linux?
rsync -avz source_dir user@remote_host:/destination_dir
44
What command copies files between two hosts over SSH in Linux ?
scp source_file user@remote_host:/destination_path
45
How do you monitor system performance in relation to time using windows command prompt?
typeperf
46
What command kills a specific process by PID in windows ?
taskkill /PID pid_number /F
47
How do you list all running processes in windows ?
tasklist
48
What command displays detailed system information in windows ?
systeminfo
49
Which command shows information about block devices in Linux?
lsblk
50
What command shows detailed information about the CPU in Linux ?
lscpu
51
How do you change the permissions of a file to read, write and execute for the owner in Linux?
chmod 755 filename
52
How do you list all files, including hidden ones, in a directory in Linux?
ls -la
53
How do you add a new user to a Linux system?
sudo useradd username
54
What command changes a user’s password in Linux?
sudo passwd username
55
How do you add a user to a specific group in Linux?
sudo usermod -aG groupname username
56
How do you update the list of available packages on a Debian-based Linux system?
sudo apt update
57
How do you remove an installed package on a Debian-based system ?
sudo apt remove package_name
58
How do you add a static route to a network in windows ?
route add 192.168.1.0 MASK 255.255.255.0 192.168.0.1
59
How do you check network adapter settings in windows ?
ipconfig /all
60
What command is used to flush the DNS resolver cache in windows ?
ipconfig /flushdns
61
What windows commands add a firewall rule to allow traffic on port 80?
netsh advfirewall firewall add rule name=“Allow80” protocol=TCP dir=in local port=80 action=allow
62
What command is used to manage firewall rules on Linux?
iptables
63
How do you list all current iptables rules?
iptables -L
64
How do you add a rule to allow traffic on port 80 using iptables?
iptables -A INPUT -p tcp —dport 80 -j ACCEPT
65
How do you block all incoming traffic on port 22 using iptables?
iptables -A INPUT -p tcp —dport 22 -j DROP
66
How do you save iptables rules to make them persistent after reboot?
iptables-save > /etc/iptables/rules.v4
67
How do you enable the firewall on a Linux system using ufw?
sudo ufw enable
68
How do you allow traffic on port 22 (SSH) through the firewall using ufw?
sudo ufw allow 22
69
How do you list active network connections and listening ports using ss?
ss -tuln
70
What command displays kernel ring buffer messages, useful for hardware diagnostics ?
dmesg
71
How do you run a port scan using nmap to check for open ports?
nmap -p 1-65535 host
72
How do you test an HTTP connection and show the headers using curl?
curl -i http://example.com
73
What tool is used for capturing and analyzing packets with a graphical interface ?
Wireshark
74
Which command captures and analyzes packets for network diagnostics in a simplified manner?
tshark (terminal version of Wireshark)
75
How do you filter DNS queries in a packet capture with tshark?
tshark -i eth0 -Y “dns”
76
How do you open a packet capture file in Wireshark?
Open the .pcap file in the Wireshark GUI
77
Which command captures packets and saves them to a file for later analysis in Wireshark ?
tcpdump -w capture.pcap
78
What command filters tcpdump to capture traffic on port 80 only?
tcpdump port 80
79
How do you capture all traffic on a specific network interface using tcpdump?
tcpdump -i eth0
80
What command line tool captures and analyzes network packets?
tcpdump
81
How do you perform a DNS lookup for a domain’s IP address?
dig example.com
82
What dig option is used to query a specific DNS server?
dig @dns_server example.com
83
Which command displays all DNS records for a domain, including A, MX, NS, etc?
dig example.com ANY
84
How do you run a TCP throughout test using ntttcp?
ntttcp -s (server) and ntttcp -c (client)
85
Which command is used to measure and benchmark network performance on windows ?
ntttcp
86
How do you trace a TCP connection to a specific host and port?
tracetcp host port
87
What tool traces TCP connections rather than ICMP?
tracetcp
88
How do you trace the path packets take to reach a remote host in windows ?
tracert host
89
What command is the windows equivalent of traceroute ?
tracert
90
What command is the windows equivalent of traceroute ?
tracert
91
How do you test if port 80 is open on a remote server using Test-NetConnection?
Test-NetConnection -ComputerName host -Port 80
92
What PowerShell command is used to test network connectivity and open ports (Windows alternative)?
Test-NetConnection
93
How do you initiai a Telnet connection to a specific host and port?
telnet host port
94
What command is used to test basic network connectivity using the Telnet protocol?
telnet
95
What command is used to start, stop, restart, or manage system services in systemd?
systemctl
96
How do you enable a service to start at boot using systemctl?
systemctl enable service_name
97
Which command lists open files and the processes that opened them, helpful for diagnosing resource leaks or identifying which files are in use by a process?
lsof
98
How do you use lsof to lists open files and the processes that opened them?
lsof -i :port_number
99
Which command lists all running processes with detailed information like CPU and memory usage?
ps aux
100
Which command searches for processes based on name or other attributes and returns their process IDs (PIDs)?
pgrep process_name