Linux Commands

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

to execute a program in your current directory, what would you type in front of the program name?

./

suppose you have extracted the files from software archive and are in the directory into which the files have been extracted. To create a Makefile with all the default values you would type _______

./configure

The ____ directory contains executables, which are the programs needed to start the system and perform other essential system tasks.

/bin

The ____ directory contains the kernel (operating system) images

/boot

The ____ directory contains the kernel (operating system) images.

/boot

If you plan to have multiple users access a system, you can create a ____ partition, which is the home directory for all users' directories.

/home

The head and tail commands, allow you to view the first few or last few lines of a file (____ lines by default).

10

Using the octal permission format, chmod ____________________ data , assigns read,write, and execute to owner; execute to group; and execute to other.

711

To append output to an existing file, you use ____.

>>

for COLORS in red blue green (A) echo $COLORS (B)

A: do B: done

Linux uses the freeware ____ shell as its default command interpreter.

Bash

You use the chexec command to indicate that a (shell script) file can be executed. (true or false)

FALSE

to increment the integer variable N by 1 you would type

N = $ [$N+1] or N = $ ((N+1))

the _______ variable provides a list of directory locations where UNIX or Linux looks to find executable scripts or programs

PATH

to add the directory "/home/bin" to your PATH, you would type

PATH="$PATH:/home/bin"

__________ are text files that contain sequences of UNIX/Linux commands

Shell scripts

A(n) ____ path begins at the root level and lists all subdirectories to the destination file.

absolute

You can use the ____ command to show the system calendar.

cal

The _____ statement simplifies the selection of a match when you have a list of choices

case

the command to view the contents of a small file is

cat

to display the contents of the "if.sh" with line numbers, you would type

cat -n if.sh

To navigate the UNIX/Linux directory structure, you use the ____ command.

cd

to change directory from your current directory to your parent directory you would type

cd ..

to modify file permissions, use the ______ command

chmod

_____ gives the owner read, write and execute permissions

chmod 755

_______ gives the owner read, write, and execute permissions

chmod 755

to determine whether two files are different, not how they are different, then use the ______ command

cmp

the command to copy a file is

cp

To reference a variable, you use a dollar sign ($) in front of it or enclose it in ___________

curly brackets {}

to see how two text files differ, use the _____ command

diff

name that identifies a grouping of computer resources on a network

domain

UNIX/Linux systems interpret ____ to mean the parent directory

dot dot (..)

If you plan to have multiple users accessing your system, you should consider having a /var partition in which to store some or all of the nonkernel operating system programs that are accessed by users. (true or false)

false

The less command scrolls only down, whereas more enables you to scroll down and up. (true or false)

false

UNIX/Linux are not case sensitive. (true or false)

false

The command to determine what type of contents a file contains is

file

use the ______ command to loop through a range of values

for

how do you stage files for a commit?

git add

What's the git command that downloads your repository from GitHub to your computer?

git clone

how do you supply a commit message to a commit

git commit -m "I'm coding"

What's the git command that downloads the latest version your repository from GitHub to an existing repository on your computer?

git fetch

What's the git command that lets you combine any changes you made on another computer with the version of your repository on your current computer?

git merge

What's the opposite of git clone, that instead of downloading your code from GitHub, uploads your changes and code back to GitHub

git push

To uncompress the compressed archive "software.tar.gz" you would type

gunzip software.tar.gz

to display the first 10 lines of a file, use the __________ command

head

You can use the -a option with the ls command to list ____________________ files.

hidden

to see a list of the command you have typed, use the _______ command

history

another name for server

host

base operating system

kernel

to pause the display while displaying the contents of large files, you can use the ______ command

less

You use the ____ command to display a directory's contents, including files and other directories.

ls

to list all the files in your current directory, including the hidden files, but without the file permissions, use the ______ command

ls -a

to list all the files in your current directory, including the hidden files and the file permission, use the ____________ command

ls -al

to list the files in your current directory including the permissions on the files use the _______ command

ls -l

to list the files in your current directory including the permissions on the files uses the ________ command

ls -l

large computer that has historically offered extensive processing, mass storage, and client access for industrial-strength computing

mainframe

Once the Makefile has been created, you can build the software by using the _________ command

make

to verify that there were no errors when building software from a Makefile, you can use the command

make check

the command to create a directory is

mkdir

UNIX and Linux are ____ systems, which allow one user to execute more than one program at a time.

multitasking

to change the name of file1 to file2 you would type

mv file1 file2

to move the file hello.sh from your current directory into a subdirectory named bin you would type

mv hello.sh bin

After you install Git and prior to issuing the first commit, which two configuration properties does git expect to be configured?

name and email address

combines the convenience and familiarity of the personal computer with the ability to share files and other computer resources

network

the command to change your password is

passwd

In shell scripts, comment lines begin with a(n) ____.

pound (#) symbol

in shell scripts, comment lines begin with a(n)

pound (#) symbol

the command to display the name of your current directory is

pwd

The _____ command stores the user's input in a variable

read

the ______ command stores the user's input in a variable

read

the command to remove a directory that contains files and/or subdirectories is

rm -rf

to remove a file named "data" from your current directory you would type

rm data

the command to remove an empty directory (folder) is

rmdir

account that has complete access to a UNIX/Linux system

root

provides multiuser access to network resources

server

with no options, ______ displays the current listing of Bash environment and shell script variables

set

interface between the user and the operating system

shell

_______ are text files that contain sequences of UNIX/Linux commands

shell scripts

suppose you have built a software package from a Makefile and verified that there were no errors. To install the software in a directory for which you do not have write permission you would type

sudo make install

The system administrator is also called the ____________________, because the system administrator has unlimited permission to alter the system.

superuser

to display the last 10 lines of a file, use the __________ command

tail

to extract the individual files from the archive "software.tar" you would type

tar -xvf software.tar

device that has a monitor and keyboard, but no CPU

terminal

echo -n "What is my favorite color? " read COLOR if ["$COLOR" = "red"] __________ echo "You guessed the right one!" else echo "No, that's not it." fi

then

A ____ is used to refer to the user's home directory.

tilde (~)

A directory is a special kind of file that can contain other files and directories. (true or false)

true

The clear command has no options or arguments. (true or false)

true

The rm -r command can be used to delete a directory that is not empty. (true or false)

true

The rm -r command can be used to delete a directory that is not empty. (true or false)

true

UNIX/Linux systems interpret a single dot character to mean the current working directory.

true

the clear command has no options or arguments (true or false)

true

the command cd source uses relative path addressing (true or false)

true

git config --global ________ [email protected]

user.email

git config --global ___________ "Jane Doe"

user.name

You can create a ____ partition to hold files that are created temporarily, such as files used for printing documents (spool files) and files used to record monitoring and administration data, often called log files.

var

to use vi to create a new file named "if.sh" you would type

vi if.sh

to display statistical information about a file, including the number of lines, words, and characters in the file, use the _______ command:

wc

the command to download a software archive from an Internet URL is _____

wget

To determine information about who is logged in, you can use the ____ command.

who

A(n) ____________________ is a special character that can stand for any other character or, in some cases, a group of characters.

wildcard


Kaugnay na mga set ng pag-aaral

Chapter 47 Integumentary Dysfunction

View Set

Sociology: Chapter 7 Social Inequality

View Set

Vestibular/Cerebellar Disorders-chapter 16 (exam 2)

View Set

Certified Ethical Hacking (CEHv11)

View Set

Intro to Sociology Donovan FSU MIDTERM

View Set