Linux Flashcards
The VI editor lets a user create new, or edit existing ______ . The command to start the VI editor is vi, followed by the ____ name
files
file name
The command to quit out of VI is
:q or :wq saves
You can specify a different file name to save to by specifying the name after the
:w filename
How do you show where you are in the cmd?
pwd
print working directory
how to access etc under the root folder?
cd /etc
how to get to home folder easily?
cd (automatically go to home directory)
How to get to parent directory?
cd ..
List the contents of a directory?
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 to create a new directory in home directory?
mkdir /testdir
How to make a file in another directory in the etc directory?
cd /etc ; mkdir /newdir
Create in one command the directories ~/dir1/dir2/dir3 (dir3 is a subdirectory from dir2,and dir2 is a subdirectory from dir1)
mkdir ~p ~/dir1/dir2/dir3
p creates parent structure files on the fly
How to remove a directory?
rmdir filename
How to rename files?
mv (oldfilename) (newfilename)
mv wolf.jpg wolf.pdf
Display the first 12 lines and last line
of /etc/services.
head -12 /etc/services
tail -1 /etc/services
Create your user account
useradd -c “Jaimie Drost” jdrost
name then username
how to add a group setting group id?
groupadd -g 60003 it-admins
how to add user to group?
usermod -G it-admins jdrost
how to modify the sudo, by adding a line to a group?
allowing group for it having unrestricted access
visudo then go to end of line CTRL I %it-admins ALL=(ALL) ALL \:wq (to save)
how to modify the sudo, by adding a line to a group?
allowing group for it having unrestricted access
visudo then go to end of line CTRL I %it-admins ALL=(ALL) ALL \:wq (to save)
How to download vmware tools?
Yum install open-vm-tools
how to show: Field for user id: and encrypted password
Less /etc/shadow
PAM stands for?
- It provides _____ authentication support for applications and services
Pluggable Authentication Modules (PAM)
dynamic
Directory for pam folder
Can change password history options
Also where lock out comes into play
Ls /etc/pam.d
How do you configure the default password quality requirements for the system?
vi /etc/security/pwquality.conf
/etc/logins.d