linux Flashcards
What is the prompt for the root user?
#
What is the prompt for the user?
$
What do you call the administrator?
root
What command is used to list directory and files?
ls
What command is used to display the message on screen?
echo
What command is used to diplay the current working directory?
pwd
What command is used to change directory?
cd
What command is used to create a blank file?
touch
What command is used to copy a file or directory?
cp
What command is used to make a directory?
mkdir
What command is used to view the contents of file or concatenate two or more files?
cat
What command is used to break output into pages?
less
What command is used to open the VIM text editor?
vim
What command is used to open the GNU nano text editor?
nano
What command is used to reboot a machine?
reboot
What command is used to shutdown a machine?
shutdown
What is the command that is used to open the manual of a command?
man
What command is used to move files or directories?
mv
What is the command that is used to rename directories?
mv
What is the command that is used to provide a brief description of the specified command?
whatis
What are the desktop environments for CentOS?
Gnome / KDE
In which directory can you find the users accounts?
etc/passwd
In which directory can you find the encrypted passwords?
etc/shadow
In which directory can you find the groups?
etc/group
What is the file that contains the list of users and groups that are given with the sudo privileges [wheel group]?
sudoers
What command is used to execute commands as root?
sudo
What command is used to configure or edit the sudoers file? This command is simpler and more secure
visudo
What command is used to open the sudoers file using vi text editor?
vim /etc/sudoers
What command is used to remove files?
rm
What command is used to remove directories?
rmdir
What command is used to add user?
useradd
What command is used to set a user’s password?
passwd
What command is used to change age? i.e password expiration
chage
What command is used to modify user settings
usermod
What command is used to delete user?
userdel
What command is used to add a group?
groupadd
What command is used to delete group?
groupdel
What is the command that is used to modify a group?
groupmod
What command is used to display the username you’re currently logged in as?
whoami
What is the command that is used to determine who are currently logged in?
w
What command is used to display the history of user login/logout?
last
What command is used to display the uid/guid?
id
What command is used to switch user to a specified user or account name?
su
What command is used to remote a print job?
lpr
What command is used to dislay the history or login/logout times for accounts?
lastlog
“*study the octal values for different permissions, ie. [rwx | owner, group, others]
What is the octal for the permission rw- r-x –x”
651
What command is used to set the default permissions on newly created files and directories?
umask
What command is used to modify permissions on file / directories?
chmod
What command is used to change ownership for a file or directory?
chown
What command is used to change group ownership of a file or directory?
chgrp
What command is used to list attributes of files or directory?
lsattr
What command is used to change the attribute of files or directory?
chattr
What is the permission that allows a user to have similar permissions as the file’s user or owner?
suid
What is the permission that allows a user to have similar permissions as the file’s group owner?
guid
What do you call the special permission bit that protects files in a directory?
stickybit
What do you call the list of permissions that are attached to an object?
acl
What command is used to get the file access control list?
getfacl
What command is used to set the file access control list?
setfacl
What partition table does legacy BIOS use?
MBR
What partition table does UEFI use?
GPT
In which directory can you find the device drivers?
/dev
In which directory can you find the binary files?
/bin
Name a bootloader that linux uses
GRUB or GRUB2 or LILO
In which directory can you find the home directories?
/home
In which directory can you find the libraries?
/lib
In which directory can you find the basic configuration files
/etc
In which directory can you find the optional files?
/opt
In which directory can you find the root directory?
/root
In which directory can you find the user files and programs?
/usr
In which directory can you find the variable files?
/var
In which directory can you find the temporary files?
/tmp
In which directory can you find the necessary files to boot the Linux operating system?
/boot
Which directories are VFS (virtual file systems)?
/proc
What command is used to display the file system in a hierarchical structure?
tree
What command is used to search for files using the mlocate database?
locate
What command is used to search for files using the directory structure?
find
What command is used to display the complete path of a command?
which
What is the command that is used to display the complete path of a command, and its manuals?
whereis
What command is used to display the content of a file or concatenate two or more files?
cat
What is the command that is used to display the first 10 lines of a file?
head
What command is used to display the last 10 lines of a file?
tail
What command is used to display the contents of a file page by page?
more or less
What command is used to make directory?
mkdir
What command is used to remote a print job?
lpr
What command is used to translate string of characters?
tr
What command is used to count the number of lines, words or characters in a file?
wc
What command is used to sort or arrange the lines in a file?
sort
What command is used to cut or extract lines of text from a file?
cut
What command is used to merge lines from text files horizontally?
paste
What command is used to compares the difference between two files?
diff
What command is used to filter or search for strings?
grep
What command is used to perform pattern matching on files?
awk
What is the command that is used for global search and replace actions, using the stream editor?
sed
What command is used to create links?
ln
What is the character that is used to redirect an output?
>
What is the character that is used to append an output to the end of a file?
> >
What is the character that is used to pipe or combine the output of a command to another?
|
What command is used to copy the output to a specified file and to the screen, at the same time?
tee
What command is used to read from standard input and execute a command for each argument that is provided?
xargs
What character can you append to a command for it to be executed in the background?
&
What command is used to diplay file metadata in a relatively user-friendly structure?
stat
What command is used to build and update a database of files? This is based on the /etc/updatedb.conf file
updatedb
What is the default text editor in GNOME desktop environments?
gedit
What keystroke is used to enter the command mode in VIM?
esc
What keystroke is used to enter the execute mode in VIM?
:
What keystroke is used to enter the insert mode in VIM?
i
What keystroke is used to write or save the file, then quit VIM?
:wq
What command is used to extract files from a tar ball?
tar -xf
What command is used to copy in and out of an archive?
cpio
What command is used to copy and convert files from one media type to another?
dd
What command is used to compress/decompress .gz files?
gzip
What command is used to compress/decompress .xz files?
xz
What command is used to compress/decompress .bz2 files?
bzip2
What command is used to invoke the package manager for RHEL?
yum or dnf or rpm
What command is used to invoke the package manager for Debian?
apt or dpkg
What do you call the software storage locations that package managers can check when installing or updating software?
repo
What command is used to create repositories?
createrepo
What command is used to see or list all available repositories?
repolist
What command is used to clear out-of-date cache information?
clean all
What is the compiler in Linux?
gcc
What command is used to create a makefile, containing instructions for compiling the software?
./configure