Commands Flashcards

1
Q

What command allows you to change directories? Also what does its options do?

A

cd /d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the prompt command do? Also, what does its options do?

A

Changes the prompt on the cmd, $P changes the name, $G changes the cursor at the end to an >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does command lists a directories contents? Also, what does its options do? (Windows/windows)

A

Dir TAS,(Time created, Specify attributes, Lists all subdirectories as well)
LS LISA (Long listing, Inode Index, Displays system blocks, displays hidden files)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command allows you to modify a files attributes and its options? (Windows)

A

Attrib -/+(attirbute) /S processes matching files, /F does process folders too

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command diplays the date/time in windows? How do you not prompt to change it? Whats the linuix version?

A

date, time /t date, followed by date/time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you check the system version in Linuix/Windows?

A

uname -a, ver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you close the cli in windows?

A

exit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you make a directory in windows/linuix? What are there options?

A

mkdir, mkdir -p(makes sub diretories)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you remove a directory in windows/linuix? What are there options?

A

rmdir /s (removes subdiretories too) rm -r(removes sub diretories) -f(force/DONT ASK ME)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you create a text file in windows with the gui through the cmd?

A

notepad

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what command allows you too create text files discreetly in windows/linuix?

A

Copy con, touch -t(lets you modify a files time stamps)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What windows commands allow you to rename files?/what are there options?

A

notepad, copy, move, ren

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you display the contents of a file in windows?

A

type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does | this represent in windows?

A

write output of command as input of another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you delete files in windows?

A

del

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What command lets you copy directories/trees in windows and what options does it posses?

A

xcopy, /e(Copies everything, like subdirectories too)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What command lets you see a history of all the commands you entered? And what are it’s options?

A

doskey /history

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What command lets you use a file’s output too overwrite another file?

A

>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What command lets you use a file’s output too append another file?

A

> >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What command lets you modify Access control lists in windows/what are its options?
What ius it’s syntax if I wanna give Sue write permissions and I want too append it?

A

cacls /e edits current ACl, /g let’s you overwrite current ACl, /p complete;ly replaces current ACl

cacls dir1 /e /g sue:W

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What command allows you to edit/delete/create users in windows?

A

net user Joe /add
net user ann /delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What command in windows allows you to edit account/password/ settings policies? What are it’s options?

A

net accounts /minpwnlen /maxpwage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What command lets you run a program as another user in windows? What are it’s options?

A

runas /user:joe notepad

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How do I terminate process on a windows machine as well as its options?

A

taskill /pid /im /f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What command lets you create /edit a group policy?

A

net localgroup bane /add
net localgroup bane /delete
net localgroup bane ann /add

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

how do I display processes on a windows machine?

A

tasklist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How do I find help for a command on linuix and where are the commands/systems calls listed on it?

A

man ls (on section 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

how do I clear the screen in Linuix/windows?

A

clear cls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How do you print the working directory in windows/linuix?

A

cd / pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How do you print all the files/subdiretories in a tree format in windows/linuix? What are there options?

A

tree /f(displays names of files in each folder /a (use ASCII instead of extended characters)
tree -c(Turn on colorization) -F(append “/” for diretories)

27
Q

What are all the text viewers in linuix?

A

more, less, head, tail, vi, cat

28
Q

What re the two mode of operation in the vi editor?

A

command/insert mode

29
Q

How do you combine files for viewing in linuix?

A

cat

30
Q

How do I start vi editor?

A

vi <filename></filename>

31
Q

What are the insertion commands for vi =editor?

A

i insert at cursor
a insert after cursor
o insert below current line
O insert after current line
yy copies line into memeory
p pastes line, adding a number before p lets you copy x times

32
Q

What are vi’s deletion commands?

A

x deletes current character
r replaces current character
dd deletes whole line

33
Q

What are vi’s navigational commands? How do you search for something specific?

A

hjkl /

34
Q

What command allows access to the ex editor command set?

A

:set nu (displays line numbers for each line text)
:set nonu(removes those lines
:<number> jumps to given line</number>

35
Q

What commands let you save/quit from vi editor?

A

:w saves
:q quits, leaving vi open in editor
:q! quits vi without saving changes
:wq quits and saves any changes

36
Q

What command let’s you rename/copy a file in windows/linuix? What are it’s options?

A

copy, cp -r(copies all subdiretories)

37
Q

What command lets you move files in windows/linuix?

A

move / mv

38
Q

What command lets you create a link between files or directories in linuix? And what are it’s options?

A

ln -s(creates the link)

39
Q

How do you search for files contains certain words in windows/linuix? What are there options?

A

find /n(displays number of lines containg specified text) /I(Ignores case sensitive)

grep -i(ignores case sensitive text)

40
Q

What command let’s you search for files by specified attributes like file type/name? In linuix

A

find

41
Q

What command displays the path of shell commands in linuix

A

which

42
Q

what command let’s you file the file type in linuix?

A

file

43
Q

How do you display every little process in linuix?

A

ps -elf

43
Q

how do you kill a process by its pid in linuix?

A

kill -9 <PID></PID>

43
Q

How do you kill a process by its name in linuix?

A

pkill -9 <process></process>

44
Q

What command prints the string of printable characters in a file?

A

strings

44
Q

How do you see a history of commands in linuix?

A

history

45
Q

What command creates a script in linuix?

A

script

46
Q

What command allows you run a task as another user in linuix?

A

su

47
Q

What command lets you see who you are right this second? On linuix

A

whoami

48
Q

What command gives you information about who’s logged on and what therer doing? What command gives you the most information?

A

who ,w

49
Q

How do you compress a file in linuix?

A

gzip

50
Q

how do you extrcat a file in linuix?

A

gunzip

51
Q

What command is used to archive files to disk in Linux what are each of these options?
c
t
x
z
v
f
c

A

tar
c creates an archive
t list table of contents
x extract to *directory
z compress the file
f read/write to file
v verbose, list each as tar read/write
c chnage directory

52
Q

How do you schedule a job in linuix?

A

at <time></time>

53
Q

How do you check what jobs are ongoing in linuix?

A

atq

54
Q

How do I remove a oncoming job?

A

atrm

55
Q

What command lets you schedule commands way in advance and can be on a set schedule? What are it’s options/syntax?

MinuteMinute HourHour DOM MM DOW

A

crontab -e(edits criontab) -l(lists the crontab entries)

MinuteMinute HourHour DOM MM DOW
Day of month
Months of execution
Days of the week

56
Q

How do I make a user in Linuix? What are its options?

A

useradd -d(specifices path to home directory) -m(makes a home directory if it doesn’t already exist
-n(gives a user a group the same as its name if not assigned to one)

57
Q

How do I delete a user in linuix? What are its options?

A

userdel -r(removes directories recursevly)

58
Q

How do I change a users password in linuix?

A

passwd <username></username>

59
Q

Where are the default settings for users in Linux/windows?

A

/etc/profile \default

60
Q

What symbol references paths that starts with a users home directory?

A

~

61
Q

What files deal with authentication and authorization in linuix?

A

/etc/pasaswd

62
Q

What files deal with Authentication in Linuix?

A

/etc/shadow

63
Q

What files deal with authorization in Linuix?

A

/etc/group

64
Q

What are the fields of etc/passwd?
U Passed up good chicks having shots

A

Username
Password
UID
GID
Comment
Home Dir
Default shell

65
Q

What are the fields of /etc/shadow?
You have lost many matches, but wining is everything

A

USER
HASHED Password
Last password MODIFCATION
MINIMUM number of days between password changes
MAXIMUM number of days a password is valid
number of WARNING days before a user is required to change there password
number of days after password expires (Account is DISABLED)
number of days from 01JAN19070 until account EXPIRES

66
Q

What are the fields of /etc/group?

Good People Give Uno

A

Group name
Password
GID
Users having this supplementary group