Linux Flashcards

1
Q

Configure IP address command on linux

A

sudo ip addr add 192.168.1.10/24 dev eth0

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

Network configuration file path on Debian and Ubuntu

A

/etc/network/interfaces

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

Network configuration file path on RHEL/CentOS

A

/etc/sysconfig/network-scripts/ifcfg-eth0

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

Configure IP route on Linux

A

sudo ip route add 192.168.2.0/24 via 192.168.1.1 dev eth0

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

DNS servers configuration file path on linux

A

/etc/resolv.conf

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

Display first 20 lines of a file on Linux

A

head -n 20

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

Display first 20 characters of a file on Linux

A

head -c 20

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

Substitution command. Substitute ( and ) by [ and ]

Hey (my name) is (josh)

A

tr “(“ “[” | tr “)” “]”

Hey, [my name] is [josh]

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

chmod 777

A

OGU
owner-group-user

7 = owner
7 = group
7 = user

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

chmod permission values

r = ?
w = ?
x = ?

A

r = 4
w = 2
x = 1

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

chmod with letters

A

+: adds permission
chmod o+rwx
chmod g+rwx
chmod u+rwx

-: removes permission
chmod o-x
chmod g-w
chmod u-w

=: sets permission overriding existing ones: (on below example read and write permissions won’t be granted, just execute permission)
chmod o=x
chmod g=x
chmod u=x

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

basic components of Linux

A
  • kernel
  • system libraries
  • system utilities
  • programming tools
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Linux file system hierarchy

A
  • /etc contains configuration files
  • /dev contains device files
  • /home contains user home directories
  • /usr contains user utilities and applications
  • /var contains variable data files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Check Linux Memory Utilization

A

free -h

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

What are Shells Used in Linux?

A

Shells in Linux are command-line interpreters that provide a user interface for access to an operating system’s services. They allow users to execute commands, run scripts, and manage files and processes.

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

What is the Linux Kernel?

A

The Linux Kernel is the core of the Linux operating system. It interacts directly with the hardware and provides services for the rest of the system. It’s open-source, meaning its source code is freely available and can be modified and distributed.

17
Q

Check Linux System Information?

A

uname -a

18
Q

Run Multiple Commands in a Single Command?

A

use ; or &&

19
Q

Check Linux Disk Space Utilization

A

df -h

20
Q

Process States in Linux

A
  • Running (R)
  • Uninterruptible Sleep (D)
  • Interruptable Sleep (S)
  • Stopped (T)
  • Zombie (Z)
21
Q

Soft Link (symbolic / symlink)

A

A Soft Link (also known as a symbolic link or symlink) is a file that points to another file or directory. If the original file is deleted or moved, the soft link will not work correctly.

22
Q

Hard Link

A

A Hard Link is a directory entry that associates a name with a file. Creating additional hard links for a file makes the contents of that file accessible via additional paths.

23
Q

How Long the Linux System Has Been Running

A

uptime

24
Q

Configure default route

A

sudo ip route add default via 192.168.1.1