• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/182

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

182 Cards in this Set

  • Front
  • Back

How to print working directory

pwd

List files and directories in a directory

ls

How to change directories

cd

Change to previous working directory

cd -

ls options to view all files and directories

-a

ls option to print a verbose list

-l

ls option to sort by time

-t

ls option to print details about directory

-d

ls option to list file size in human readable format

-h

ls option to display results in reverse order

-r

ls option to sort by size

-s

Command used to print a brief description about a file

file

Command that is used to open file viewing program

less

Less key to scroll back a page

b

Less key to scroll forward one page

space

Less key to scroll to end of page

G

Less key to move to beging of page

g

Less key to search for charactesr

/[characters]

Less key to move to next result in search

n

Directory that contains binaries that must be present for the system to boot

/bin

Directory that contains the linux kernal, initial RAM disk image and the boot loader

/boot

Directory that contains the device nodes

/dev

Directory that contains all of the system-wide configuration files

/etc

File that defines the automated jobs that will run

/etc/crontab

File that lists the user accounts

/etc/passwd

Directory that holds shared library files for the system

/lib

Directory where removable media is mounted

/media

Directory were optional software is installed

/opt

Home directory for root account

/root

Directory that contains the system binaries

/sbin

Directory for temporary transient files

/tmp

Directory that contain all the programs and support files used by regular users

/usr

Directory that contains the executable programs installed by your linux distribution

/usr/bin

Directory for shared libraries in /usr/bin

/usr/lib

Directory for programs not included with distribution, but intended for system wide use are installed.

/usr/local

Directory for all shared data used by programs in /usr/bin

/usr/share

Directory where data that is likely to change is stored

/var

Directory that contains log files

/var/log

Wildcard that matches any character

*

Wildcard that matches a single character

?

Wildcard that is a member of a set of characters

[characters]

Wildcard that is not a member of the set of characters

[!characters]

Wildcard that is a member of the specified class

[[:class:]]

Characters class for alphanumeric characters

[:alnum:]

Character class for alphabetic characters

[:alpha:]

Character class for any number

[:digit:]

Character class for any lowercase letter

[:lower:]

Character class for any uppercase letter

[:upper:]

Command to create a directory

mkdir

Command to copy files or directories

cp <source> <destination>

Copy argument to copy all of the files attributes

-a

Copy argument to prompt user before overwritting

-i

Copy argument to perform a recursive copy

-r

Copy argument to copy only files that either don't exist or are newer that the existing corresponding files in the destination directory

-u

Copy argument to display information messages as the copy is performed

-v

Command to move or rename a file or directory

mv <source> <destination>

Move argument to prompt user before overwritting a file

-i

Move argument to only move files that either don't exist in the destination folder or are newer than the existing corresponding files in the destination directory

-u

Move argument that displays information messages as the move is performed

-v

Command to remove files and directories

rm

Remove argument that prompts the user before deleting a file

-i

Remove argument that recursively deletes directories

-r

Remove argument that ignores nonexistent files

-f

Remove argument that displays information as deletion is performed

-v

Command to create hard symbolic link

ln <file> <link>

Command to create a symbolic link

ln -s <file> <link>

Command to find out the type of a command

type <command>

Command to display the location of an executable

which

Command to get help from shell builtins

help

Option many commands have to display a description of the command

--help

Command to display the programs manual page

man <command>

Command used to find appropriate commands

apropos <keyword>

Command to display a very brief description of a command

whatis <command>

How to put multiple commands on one line

Separate the commands with a semicolon

Command to assign an alias

alias <newcommand>='<commands>'

Command to remove an alias

unalias

Command to see all aliases in a system

alias <no arguments>

Character(s) to redirect standard output of a file

>

Character(s) to redirect standard output to a file and append new content

>>

Character(s) to redirect standard error

2>

Bit bucket directory that accepts input and does nothing with it

/dev/null

Command that reads one more more files and copies them to standard output

cat

Character(s) used to redirect standard input

<

Character(s) used to pipe commands

<command> | <command>

Command used to sort lines

sort

Command used to remove duplicats

uniq

Argument for Unique command to list duplicates instead of removing them

-d

Command used to report number of lines, words and bytes

wc


Output: <lines> <words> <bytes>

Wordcount argument used to only output number of lines

-l

Command used to print lines matching a patter

grep

Command used to print the first n lines of a file

head

Command used to print the last n lines of a file

tail

Argument to adjust head and tail display line count

-n

Argument to adjust the tail command so that the file can be viewed as it is updated

-f

Command that reads from stdin and outputs to stdout and files

tee <file>

Display a line of text

echo

Expand home directory

~

Arithmetic expansion

$(( expression ))

Brace Expansion

{}


{A,B,C}


{1..5}


{A{1,2},B{3,4}}

Parameter expansion

$<Parameter>

See a list of all variables

printenv

Command Substitution

$(command)

Suppress all expansion except for $, \ and `

Double quotes

Suppress all expansion

Single quotes

Clear the screen

clear

Display the contents of the history list

history

Move cursor to the beginning of the line

Ctrl + A

Move the cursor to the end of the line

Ctrl + E

Move cursor forward on character

ctrl + F

Move cursor backward on character

Ctrl + B

Move cursor forward one word

Alt + F

Move cursor backward one word

Alt + B

Clear the screen and move the cursor to the top left corner

Ctrl + L

Delete the character at the cursor location

Ctrl + D

Transpose(exchange) the character at the cursor location with the one preceding it

Ctrl + T

Transpose the word at the cursor location with the one preceding it.

Alt + T

Convert the characters from the cursor location to the end of the word to lowercase

Alt + L

Convert the characters from the cursor location to the end of the word to uppercase

Alt + U

Kill text from the cursor location to the end of line

Ctrl + K

Kill text from the cursor location to the beginning of the line

Ctrl + U

Kill Text from the cursor location to the end of the current word

Alt + D

Kill the text from the cursor location to the beginning of the current word. If the cursor is at the beginning of a word, kill the previous word

Alt + Backspace

Yank text from the kill ring and insert it at the cursor location

Ctrl + Y

Execute a command in the history

!<history number>

Reverse incremental Search

Ctrl + R

Move to the previous history entry

Ctrl + P or up arrow

Move to the next history entry

Ctrl + N or down arrow

Move to the beginning of the history list

alt <

Move to the end of the history list

alt >

Reverse search, non-incremental

alt p

Forward search, non-incremental

Alt N

Execute the current item in the history list and advance to the next one

Ctrl O

Repeat the last command

!!

Repeat last history list item starting with string

! string

Repeat last history list item containing string

!? string

Find out info about your identity

id

Symbol for a regular file in ls -l

-

Symbol for a directory in ls -l

d

A symbol for a symbolic link in ls -l

l

What is the order of permission of a file

owner group world

Command to change a files permissions

chmod

How does octal permissions work?

A 1 is active and a 0 is disabled. The order of permission types is read write and execute



example 101 = 5 = read and execute

How does character permission work?

Specify who the change will be affecting then a + or minus to symbolize permission being added and then a character for each permission

u+rw will add read and write permissions for the user

chmod symbol for the file owner

u

chmod symbol for the group owner

g

chmod symbol for other

o

chmod symbol for all

a

Set default permissions

umask

Start the shell as another user

su

su argument to load the users enviroment

-l

su argument to execute a command

su -c '<command>'

Command that allows users to execute commands as other users in a very controlled manner

sudo

sudo argument to see granted privileges

-l

Change a file owner and group

chown [owner] [:[group]] <file>

Change a files group

chgrp

Change password

passwd [user]

Simple command to view a snap shot of processes

ps

What is the TIME field in the ps output

The amount of CPU time consumed by the process

ps argument to show all process regardless of what terminal controls them

x

popular group of arguments for ps

aux

command to see dynamic view of the machines activity

top

start a process in the background

<command to start process> &

return a process to the forground

fg %<job number>

How to pause a processes

ctrl + z

Move a program to the background

bg %<job number>

Command used to terminate a process

kill <pid>


kill %<job number>

Command used to kill process by name

killall <name>

Command used to output process in a tree like pattern of parent to children

pstree

Command to output a snapshot of system resources

vmstat

A graphical program that draws a graph showing system load over time

xload

A terminal program that draws a graph of the system load in the terminal

tload

Command used to view both shell and environment variables

set

Command used to print only the environment variables

printenv

How do you start a login shell

Start a virtual console session

How do you start a non-login shell

From a gui

A global configuration script that applies to all users. (login shell)

/etc/profile

A users personal startup file. Can be used to extend or override settings in the global configuration script (login shell)

~/.bash_profile

If ~/.bash_profile is not found, then bash attempts to load this script (login shell)

~/.bash_login

If neither ~/.bash_profile or ~/.bash_login is not found, then bash attempts to load this script (login shell)

~/.profile

A global configuration script that applies to all users (non-login shell)

/etc/bash.bashrc

A users personal startup file. Can be used to extend or override settings in the global configuration script (non-login shell)

~/.bashrc

Command used to force bash to read a file

source <file>