Linux Flashcards

1
Q

The VI editor lets a user create new, or edit existing ______ . The command to start the VI editor is vi, followed by the ____ name

A

files

file name

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

The command to quit out of VI is

A

:q or :wq saves

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

You can specify a different file name to save to by specifying the name after the

A

:w filename

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

How do you show where you are in the cmd?

A

pwd

print working directory

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

how to access etc under the root folder?

A

cd /etc

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

how to get to home folder easily?

A

cd (automatically go to home directory)

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

How to get to parent directory?

A

cd ..

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

List the contents of a directory?

A

ls
ls ~l or ll(long list)
ls /etc (to get a specific file directory listing
ls /bin /sbin (for two directories)
ls ~all ~ (all the files (including hidden files) in your home directory)
ll /boot (shows file size)

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

How to create a new directory in home directory?

A

mkdir /testdir

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

How to make a file in another directory in the etc directory?

A

cd /etc ; mkdir /newdir

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

Create in one command the directories ~/dir1/dir2/dir3 (dir3 is a subdirectory from dir2,and dir2 is a subdirectory from dir1)

A

mkdir ~p ~/dir1/dir2/dir3

p creates parent structure files on the fly

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

How to remove a directory?

A

rmdir filename

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

How to rename files?

A

mv (oldfilename) (newfilename)

mv wolf.jpg wolf.pdf

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

Display the first 12 lines and last line

of /etc/services.

A

head -12 /etc/services

tail -1 /etc/services

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

Create your user account

A

useradd -c “Jaimie Drost” jdrost

name then username

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

how to add a group setting group id?

A

groupadd -g 60003 it-admins

17
Q

how to add user to group?

A

usermod -G it-admins jdrost

18
Q

how to modify the sudo, by adding a line to a group?

allowing group for it having unrestricted access

A
visudo
then go to end of line
CTRL I
%it-admins ALL=(ALL) ALL
\:wq (to save)
19
Q

how to modify the sudo, by adding a line to a group?

allowing group for it having unrestricted access

A
visudo
then go to end of line
CTRL I
%it-admins ALL=(ALL) ALL
\:wq (to save)
20
Q

How to download vmware tools?

A

Yum install open-vm-tools

21
Q

how to show: Field for user id: and encrypted password

A

Less /etc/shadow

22
Q

PAM stands for?

- It provides _____ authentication support for applications and services

A

Pluggable Authentication Modules (PAM)

dynamic

23
Q

Directory for pam folder
Can change password history options
Also where lock out comes into play

A

Ls /etc/pam.d

24
Q

How do you configure the default password quality requirements for the system?

A

vi /etc/security/pwquality.conf

/etc/logins.d

25
Q

Move and change users/groups?

A

Usermod- modify groups for users
-G -modify groups you belong to
Usermod -G itadmins jdrost
Usermod -aG projects jdrost (ammend leaves in current groups and adds to specified group)

26
Q

see how password aging works?

A

chage –list (user)

27
Q

To change password settings:

A

sudo chage
then shows options
then include username

28
Q

edit passwords stuff

A

sudo vi /etc/login.def

29
Q

Ways to edit password system authentication and password authentication

A

sudo vi system-auth

sudo vi password-auth

30
Q

how to move all files and folders in folder

A

mv -v ~/Downloads/* ~/Videos/

31
Q

see user list

A

/etc/shadow

32
Q

see group list

A

/etc/group

33
Q

How to Restart network

A

systemctl restart network