Linux Flashcards

1
Q

Default text Editor

A

Vim

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

Syntax to Launch Vim

A

vi FileName

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

:w

A

write

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

:q

A

Quit editor

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

:!

A

Exit editor

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

:wq!

A

Write/save, Quit, and Exit

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

yy

A

yy: copy line
p: paste line

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

x

A

Delete character

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

dd

A

delete line

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

whoami

A

check active user name

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

id

A

user id

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

Root user/super user

A

The root user has no restriction and can perform ay task.

However, a root user can elevate an ordinary user by granting them sudo privileges by making an entry into SUDO /etc/sudoers file. so they can

they can now perform tasks by prefixing their commands by sudo

  1. Install packages
  2. Make configuration changes
  3. make network changes
  4. Elevate permissions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Curl or wget

A

curl or wget.http://xhejfkldwsjnwhedasj/file -o Filename.txt

the -o flag is to specify storage location.

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

ssh @user ipaddress

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

check os version

A

/etc/release

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

RPM (Redhat package manager)

A

Granular package installation

17
Q

Yum installer

A

wholistic package installer, just like brew for GNU. It finds dependencies, repos and package components.
Under the hood, yum uses RPM

18
Q

~yum repolist

A

location of files where package repos are stored

19
Q

ls etc/yum.repos.d/

A

to see the list or package repos

20
Q

Services

A

enables programs to start automatically when rebooted, as well as start in the right order

21
Q

system ctl

A

command to start, enable stop system services:

enable: start upon reboot, or program restart due to failure

system ctl command can be run before configuration

22
Q

cat /proc/sys/net/ipv4/ip_forward

A

check ip forwarding status
this can either be st to 0 or 1 using the $echo command

23
Q

$ ip route || ifconfig

A

check route table entries

24
Q

$ ip link

A

to list and modify links on the host

25
Q

$ ip addr

A

to see ip address on the interfaces

26
Q

$ ip route add

A

to add entries into route table

27
Q

Network settings validity

A

all Network settings are only valid within a boot Lifecycle

28
Q

$ rmdir vs
$ rm

A

The rmdir command is used to remove empty directories only and does not have a recursive option like rm -r for removing directories and their contents.

29
Q

sudo can enable root

A
30
Q

$ sudo chmod 444

A

enables read-only mode for all users on a particular file

31
Q

$ cat&raquo_space;

vs

$ cat >

A

// cat&raquo_space;
for appending content to an existing file

for creating or overwriting a file with content/string // use of the command cat >