Linux

¡Supera tus tareas y exámenes ahora con Quizwiz!

3 Forms of quoting

" ", ' ', \

what character indicates a command was used by an admin

#

How is it possible to determine if an executable file is a shell script read by Bash?

#!/bin/bash

iwlist

can identify nearby wireless networks

You have been asked to create a script will present the user with a onboard menu in which they can select 4 different commands to run by entering 1, 2, 3, or 4. Which of the following statements should you use to create the simplest and most effective method of choosing the command to run based on the user's input?

case

What command is used to change the group ownership of a file?

chgrp

history -c

clears the history

How can the normal output of a command be written to a file while discarding the error output?

command > file 2>/dev/null

Which of the following is true about environment variable names by convention?

contains all capital letters

cp -r

copies directories, files, subcontent all of it

cp

copy a file or directory

mkdir -p

creates a folder and subfolder if needed

tar cf

creates tar file

Copying text in command line

ctrl, shift and C

cd . shows what?

current directory

Which directory contains all of the installed kernels on your system and their needed drivers

/boot

used as a virtual or pseudo filesystem to provide a tree of all of the device nodes and drivers in the running kernel

/dev

where are config files stored

/etc

Which file contains a list of the user's secondary groups?

/etc/group

Which directory contains the files and directories automatically copied over to a new user's home directory when the account is first created?

/etc/skel

virtual or pseudo filesystem used to interface with the kernel and process

/proc

Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and system as a whole but not with individual processes?

/sys

Where should temporary files be stored on a Linux system that can be safely deleted during a reboot?

/tmp

where linux stores most of its log files

/var/log

Descriptor number used to represent the Standard In (STDIN)?

0

If the last command was ran successfully what will the echo $? command show

0

root user UID

0

Descriptor number used to represent the Standard Out

1

Package managers for Debian

APT-GET, APT, DPKG

2>>

Adds the standard errors to the existing file

Open source web server

Apache

HTTP server apps for Linux

Apache, Nginx, lighttpd

iwconfig

Can connect to and disconnect from specific wireless networks

Linux OS project that uses Red Hat code but provides no support

CentOS

General command structure

Command (What to do?) > Options (How to do it?) > Arguments (What to do with it?)

C and Java are what kind of languages

Compiled

Compiled and interpreted language difference

Compiled needs a compiler and is faster

practice of offering people the right to freely distribute copies and modified versions of a work with the stipulation that the same rights be preserved in derivative works created later

Copyleft

2>

Creates a standard error file

American non-profit organization devoted to expanding the range of creative works available for others to build upon legally and to share

Creative Commons

3 Package formats

DEB, RTM, TAR

cut command

Extracts specified lines of text from a file.

.rpm used by

Fedora, Opensuse

Globbing

Filename expansion using asterisks (*), question marks (?), and so on is sometimes called globbing.

FHS

Filesystem Hierarchy Standard

What does the term GPL stand for?

General Public License

2 Major desktop linux enviroments

Gnome, KDE

command line tool to convert and edit image files

ImageMagick

Libreoffice version of powerpoint

Impress

vector graphics software for linux

Inkscape

Programming language mainly associated with portable

Java

Programming used with web pages, servers, mobile devices

Javascript

what does LAMP (web server) stand for

Linux, Apache, MySQL, PHP

2 variables

Local (current shell process) and Environmental (built in ones)

Lossless vs Lossy

Lossless can be decompressed from the original form, lossy cannot but is hardly noticeable

DB apps for Linux

MySQL, MariaDB, PostgreSQL

2 parameters after a command

Options (switches starts with a -) and Arguments

Server side scripting language

PHP

Programming language used mostly with text content

Perl

Open source mail server

Post-Fix

dmesg

Print kernel & driver messages

Popular programming app used with beginners

Python

name given to the action of protecting shell meta-characters from being treated specially by the shell

Quoting

Package managers for RPM

RPM, YUM, DNF

Which Linux distribution is used as a basis for the creation of Scientific Linux?

RedHat

The ? wildcard

Represents a single character Ex. b??l = ball,bowl

The * wildcard

Represents any string of characters Ex. b*l = bol, biidddl

Which of the following information can be displayed by top?

Running processes, ordered by CPU or RAM consumption

Linux distrib that is known for YaST config tool to allow admins to install and configure software and hardware, servers, networks

SUSE

Variable naming rules

Starts with a letter, no spaces (underscores instead), and no punctuation marks

Most common archiving tool

TAR

Universal linux package format

TGZ

.deb used by

Ubuntu

printenv command

Used to display a list of exported variables and functions present in the current shell.

3 Linux hypervisors

Xen, KVM, VirtualBox

Which string should you add to put the date into the prompt of the shell?

\d

Searching for program with apt

apt-cache search or apt search

Installing with apt

apt-get install 'name' or apt install 'name'

Uninstalling with apt

apt-get remove 'name or apt remove 'name;

.tar used by

archlinux and slackware

Audio player programs for Linux

audacious, banshee, amarok

Which command is used to provide information about a user's identity, including the names of the groups that the user belongs to?

id

Command that gives you more depth than man

info

More detailed than man and is formatted like a web page

info

mv

move a file or directory

Which of the following displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics?

netstat

Types of shells

bash, zsh, ksh, tcsh

Commands to resolve an ip to a dns name

nslookup, dig, host

Location of a hard link

origname linkname

Which of the following is a suite of client-server software for creating and using file hosting services?

ownCloud

Web sharing files apps for Linux

ownCloud, Nextcloud

Which of the following provides the correct syntax to search for lines ending with the given pattern using the grep command?

pattern$

pwd

present working directory

What statement is used to get input from the terminal when a shell script is being run?

read

grep -r

recursive search

What does the "rm -rf" command do in Linux?

remove all files in the directory and sub-directories

Removing a directory and it's subs and files

rm -r

Removing an empty directory and empty sub directories

rmdir -p

A Linux computer currently has no access to the internet. Which command is used to display and manipulate the information about the network gateway for the system?

route

grep -c

search counts the # of matches

grep -i

search is not case sensitive

apropros

searches manual pages for keywords

RHEL and CentOS are optimized for what environments

server

What column tells the "w" program which session is running?

what

What command can be used to find man pages that exist for a given command?

whatis

What command can be used to find the executable and man pages that exist for a given command?

whereis

Which of the following commands can search for executable programs or scripts located in the PATH variable?

which

Installing with rpm

yum install name or dnf install name

Uninstalling with rpm

yum remove 'name or dnf remove 'name'

Searching with rpm

yum search 'name or dnf search 'name'

Location of a symbolic link

-s origname link

Option with useradd that will create the default home directory for the new user

useradd -m

tar tf

views contents of a tarball

Listing all of the variables of a command

$ followed by tab twice

tar options don't require what character?

-

option used to get info on a command

-help

which option causes the echo command to not have a trailing newline

-n

Which option can be used with useradd to create a new user without a home directory?

-M

Which of the following options is used with tar to create a new .tar archive file?

-c

Which option can be used with tail to print the last X bytes of a file to the screen?

-c

Which option can be used with useradd to specify the home directory for a user?

-d

Which of the following options is used with tar to specify the filename of the tar archive?

-f

Which option can be used with tail to print the last 10 lines of a file and then keep printing any new lines that may be added continuously

-f

Regular users on linux start with what number

1000 and then plus 1 for every user after

Year Linus created Linux

1991

Which of the following statements would be used for sending both standard output and standard error to the same location?

2>&1

default permission for a script

664

Wildcards

?, *, []

2 Linux password managers

Bitwarden, keePass

3d rendered linux program

Blender

Programming language usually associated with OS

C

computer program that runs as a background process rather than under the direct control of an interactive user

daemon

top

detailed processes

What is the command that will show system boot time messages?

dmesg

What keyword should be used to fill in the blank in the following segment of the given shell script? for i in *; _____ cat $i done

do

To determine if the last command run on a system was successful, which command should be executed?

echo $?

Which of the following commands would be used to display the value of the HOME variable to the terminal's display?

echo $HOME

Which command shows all of the directories that the shell searches for programs?

echo $PATH

test | lizard

either of the words

$

end of a line

Which of the following files contains a mapping of IP addresses to URLs locally on your Linux machine?

etc/hosts

Which command is used to make a shell variable known to subsequently executed programs?

export

tar xvf

extracts a single file

tar xf

extracts the files

How can the current directory and its subdirectories be searched for in the file named MyFile.xml?

find . -name MyFile.xml

grep

finding text inside files

Which command-line tool will create a filename that ends in .gz?

gzip

What command shows history

history

free

how much memory is being used

Which of the following is the filesystem for a CD-ROM?

isofs

Which of the following commands can be used to determine the time of the last login of a given user?

last

Command to view one page at a time

less

Command for creating symbolic link

ln -s

Which network interface always exists in a Linux system?

lo (loopback interface)

Command for a recursive listing view

ls -R

Which of the following commands is used to show the information about a directory or a symbolic link?

ls -d

Which command can be used to search help files that mention the word "copy"?

man -k copy

[^a-z]

matches any character not in this range

grep -v

shows lines that do not match

ps

shows processes

^

start of a line

Difference between su and sudo command

sudo is only used for one command at a time

Which of the following options is used with tar to display the tar command's progress during execution?

tar -v

Which of the following is used to untar a tar archive file

tar -x

What does the letter t at the end of drwxrwxrwt indicate within the following directory permissions? drwxrwxrwt 14 root root 36864 2012-03-02 11:17 /tmp

the directory is globally writeable but only the owner can delete their own files in the directory

reverse DNS

the ip address reversed and then.in-addr.arpa

Which of the following is the UNIX device name for a physical or virtual terminal connection?

tty

Which of the following commands can be used to change default permissions for files and directories at the time of creation?

umask


Conjuntos de estudio relacionados

Exam 4 sample quizzes (ch 17 and 18)

View Set

Lecture 20: Eukaryotic Transcription

View Set