wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MS2024 Pre-Quiz #5

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

ข้อใดต่อไปนี้ติดตั้งอยู่ใน Ubuntu Desktop โดย Default แต่โดยทั่วไปจะไม่อยู่ใน Ubuntu Server?

a)

Apache HTTP Server

b)
Graphical User Interface (GUI)
c)
Command-line interface only
d)
Database management system (MySQL, MariaDB, PostgreSQL)
2.

เลือกกรณีการใช้งานทั่วไปสำหรับ Ubuntu Server? (เลือก 3 คำตอบ)

a)
Web hosting
b)
Word processing
c)
Database server
d)
File server
e)
Gaming
3.

Ubuntu รุ่นใดที่เหมาะสมที่สุดสำหรับการเรียกใช้ DNS server เช่น Dnsmasq?

a)
Ubuntu Desktop
b)
Ubuntu Server
c)

ทั้งสองเหมาะสมเท่ากัน

Both are equally suitable

d)

ไม่เหมาะสมทั้งคู่

Neither is suitable

4.

Ubuntu Server มั firewall (UFW - Uncomplicated Firewall) เปิดใช้งานโดย default เพื่อความปลอดภัย

a)

True

จริง

b)

False

เท็จ

5.

ข้อใดต่อไปนี้อธิบายวัตถุประสงค์หลักของคำสั่ง systemctl ได้ดีที่สุด?

a)

เพื่อจัดการหน่วย systemd รวมถึง service targets และ timers

To manage systemd units, including services, targets, and timers.

b)

เพื่อแสดงและแก้ไขการตั้งค่าเครือข่าย

To display and modify network configuration settings.

c)

เพื่อติดตั้ง อัปเดต และลบแพ็คเกจซอฟต์แวร์

To install, update, and remove software packages.

d)

เพื่อตรวจสอบการใช้ทรัพยากรระบบ

To monitor system resource usage (CPU, memory, disk).

6.

คุณสามารถติดตั้ง desktop environment บน Ubuntu Server หลังการติดตั้งเสร็จแล้ว ซึ่งจะเปลี่ยนให้เป็น Desktop System ที่ทำงานได้อย่างมีประสิทธิภาพ

a)

True

จริง

b)

False

เท็จ

7.

Shell ใดที่ใช้กันทั่วไปมากที่สุดเป็น default command-line interpreter บน Ubuntu Server?

a)
Zsh
b)
Bash
c)
Fish
d)
Ksh
8.

ข้อใดต่อไปนี้เป็นโหมดใน Vim? (เลือก 3 คำตอบ)

a)

Normal Mode

b)
Visual Mode
c)
Edit Mode
d)
Insert Mode
e)
Overlay Mode
9.

ปุ่มใดที่ใช้เพื่อเปลี่ยนจาก Normal Mode เป็น Insert Mode ใน Vim?

a)
i
b)
e
c)
esc
d)
q
10.

ปุ่มใดที่ใช้เพื่อเปลี่ยนจาก Insert Mode ไปเป็น Normal Mode ใน Vim?

a)
i
b)
esc
c)
r
d)
n
11.

คุณลบข้อความไปบรรทัดนึงใน Vim โดยไม่ได้ตั้งใจ คุณจะยกเลิกการลบนั้นใน Normal Mode ได้อย่างไร?

a)
Ctrl-z
b)
p
c)
u
d)
.
12.

คุณเปิด Vim โดยไม่ได้ระบุชื่อไฟล์ คุณได้ทำการแก้ไขบางอย่างและตอนนี้ต้องการบันทึกไฟล์นั้นโดยใช้ชื่อ "bootcampdocs.txt" โดยไม่ต้องออกจาก Vim คุณต้องพิมพ์อะไร Command Mode?

(a)  

13.

คุณต้องการลบบรรทัดข้อความทั้งบรรทัดใน Vim คุณจะต้องพิมพิ์อะไรใน Normal Mode?

a)
Ctrl-Backspace
b)
dd
c)
c
d)
x
14.

ในการบันทึกการเปลี่ยนแปลงและออกจาก Vim คุณพิมพ์ (a)   ใน Command mode.

15.

คำสั่ง tr 'a' 'A' < myfile.txt จะทำอะไร

a)

แทนที่ 'a' ทั้งหมดด้วย 'A' ใน myfile.txt

Replace all occurrences of 'a' with 'A' in myfile.txt

b)

แทนที่ 'A' ทั้งหมดด้วย 'a' ใน myfile.txt

Replace all occurrences of 'A' with 'a' in myfile.txt

c)

ลบ 'a' ทั้งหมดใน myfile.txt

Delete all occurrences of 'a' in myfile.txt

d)

ต่อท้าย 'A' ไปยังท้าย myfile.txt

Append 'A' to the end of myfile.txt

16.

คำสั่งใดที่ใช้เพื่อค้นหารูปแบบเฉพาะ (Pattern) ภายในไฟล์?

a)
grep
b)

sed

c)
find
d)
search
e)
cat
17.

คุณต้องการลบบรรทัดที่ซ้ำกันออกจากไฟล์ แต่เฉพาะในกรณีสิ่งที่ซ้ำกันนั้นอยู่บรรทัดติดกันโดยต้องไม่เปลี่ยนลำดับบรรทัด คำสั่งใดที่เหมาะสม?

a)

cat <filename> | uniq

b)

sort <filename> | uniq

c)

sort -u <filename>

d)

rev <filename> | uniq | rev

18.

คุณต้องการสร้าง hard link ไปยังไฟล์ คำสั่งใดไม่ถูกต้อง

a)
ln source-file target-file
b)
ln -s source-file target-file
c)
link source-file target-file
d)
cp -l source-file target-file
19.

วัตถุประสงค์หลักของคำสั่ง fold คืออะไร?

a)

เพื่อรวมไฟล์หลายไฟล์เป็นไฟล์เดียว

To merge multiple files into a single file.

b)

เพื่อลบบรรทัดว่างออกจากไฟล์

To remove blank lines from a file.

c)

เพื่อ wrap บรรทัดข้อความให้มีความกว้างตามที่ระบุ

To wrap lines of text to a specified width.

d)

เพื่อเรียงลำดับบรรทัดข้อความตามตัวอักษร

To sort lines of text alphabetically.

20.

คำสั่ง cat file1 file2 > file1 ก็ดูเหมือนจะตรงไปตรงมานะ แต่เหตุการณ์ที่ไม่คาดคิดอาจเกิดขึ้นได้อย่างไร?

a)

file1 กลายเป็นไฟล์ว่างเปล่า

file1 becomes empty

b)

เนื้อหา file1 กลายไปเหมือนกับ file2

file1 becomes identical to file2

c)

file1 มีเนื้อหาที่รวมกันของทั้งสองไฟล์

file1 contains the combined contents of both files

d)

Error Message จะปรากฏขึ้น

An error message is displayed