Linux + Commands (Original by Sirron_Carrector)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/99

flashcard set

Earn XP

Description and Tags

I don't own anything, I just reupload and need to do this for my studies. Original is here: https://quizlet.com/307593269/linux-commands-flash-cards/

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

100 Terms

1
New cards

pwd

print working directory

2
New cards

su

Switch User

3
New cards

~

Shows Home Directory

4
New cards

$

Level of Access- typical user?

5
New cards

exit

" "

6
New cards

Ctr + Alt F1-F12

switch sessions

7
New cards

ls

list

8
New cards

-l

long list

9
New cards

{tab}

auto complete

10
New cards

{up arrow}

previous commands

11
New cards

/usr

information on a directory

12
New cards

date

date and time information

13
New cards

echo $ (date)

date and time information

14
New cards

cal

calendar

15
New cards

clear

clear command script

16
New cards

cal (month) (year) i.e. -cal 06 15

calendar for entire 2015 year/alternate times

17
New cards

uptime

shows how long system has been up- Shows users and load on the OS

18
New cards

who

where connections are coming from with different users- also the IP addresses of different users

19
New cards

whoami

current user- who is logged on

20
New cards

hostname (new name)

local machine being used (can change host cpu name) if used alone "host name" changes it back to default system name

21
New cards

w

shows who is logged in, time they have been in a session

22
New cards

last

record of users and what the system has done, with times too

23
New cards

echo

repeats back, whatever is held in the variable following it

24
New cards

sleep (time) i.e. sleep 5

puts the system to sleep for 5 seconds or any other time.

25
New cards

cd

change directory

26
New cards

sudo (super user do)

temporary elevates privileges

27
New cards

cat

shows what is in a file

28
New cards

which cat

where is the cat command located

29
New cards

/bn/ i.e. cd /bn/

bin directory is location of many commands

30
New cards

man (any search term) i.e. man clear

shows possible commands and definitions of search commands

31
New cards

q

quit

32
New cards

-a i.e. ls touch-a

show all

33
New cards

mv

move

34
New cards

apropos (search term) i.e. apropos network

Another way to search general terms related to commands

35
New cards

info i.e. info ls

further information on commands and what they do (was meant to replace the man pages)

36
New cards

/etc/init.d/

shows what is running (background processes)?

37
New cards

service (application) i.e. service cups

shows status of background processes

38
New cards

stop i.e. sudo service cups stop

stop an application (may ask for creds)

39
New cards

status i.e. ./cups status

shows status of an application

40
New cards

cat /etc/initab

read the content in the file initab

41
New cards

sudo telinit 3

switched to a run level 3 in the intab file (command is specific to red hat machines)

42
New cards

pstree

process tree-shows what processes are responsible for others

43
New cards

enter

give space to type new commands, prevents clutter

44
New cards

shutdown i.e. sudo shutdown -r now

shutdown system

45
New cards

-r

restart

46
New cards

-h

halt

47
New cards

poweroff

power down the machine

48
New cards

runlevel

see current run level

49
New cards

telinit (1-5)

Change run level

50
New cards

useradd (name)

adds user

51
New cards

cat /etc/passwd

shows all different user accounts

52
New cards

passwd (user name)

creates a password for a user

53
New cards

useradd -D

shows where users are assigned and other stats

54
New cards

ls /home

shows all user names

55
New cards

/(search letter)

can use to search through directories

56
New cards

usermod

Modify a user

57
New cards

cat /etc/shadow

Information (Encrypted) on users, only available to root users. Use for Admin to edit stuff

58
New cards

groupadd (name of group)

create a group

59
New cards

usermod -G (list name of group) (name of user)

Add user to group

60
New cards

groups (user name)

See where a particular user is group wise

61
New cards

cd /etc/profile.d/

can be used to edit user accounts

62
New cards

userdel i.e. userdel -r Stacie

delete user account/erase files

63
New cards

groupmod

modify group

64
New cards

groupdel

delete a groupgrouphost

65
New cards

tail /etc/group

check on users and groups

66
New cards

gedit (file name)

able to edit individual files in gedit

67
New cards

env | less

observe settings of users desktop?

68
New cards

shift + :

Bring up the command line to escape

69
New cards

usermod -l

lock an account

70
New cards

ctr+alt+F7

takes back to desktop window

71
New cards

/dev/hda1

LESSON 3 Start

72
New cards

e2label /dev/(device name)(partition number) (label name)

label a file system

73
New cards

fdisk (options) (device name) -b, -h, -S, -s, -v, -l, These are used inside the file: n, d, p, w, q,

show options for hard drives/ alter hard disks

74
New cards

mkfs -v,-V, -t, fs-options,-c,-l

make file system on a hard drive

75
New cards

mke2fs -b,-c,-f,-j,-M,-V

create ext2,3,4 filesystems

76
New cards

mkdir i.e. mkdir /morning

make directory

77
New cards

ctrl+c

Get out of the directory

78
New cards

parted

get into the GNU parted utility

79
New cards

mount i.e. mount LABEL=Mrng /morning

mount a HD

80
New cards

print

shows partition label

81
New cards

/boot

directories for startup

82
New cards

/bin

command line utilities

83
New cards

/dev

device drivers

84
New cards

/etc

basic configuration

85
New cards

/lib

shared programs libraries

86
New cards

/sbin

stores binaries

87
New cards

/usr

small programs

88
New cards

/var

store system logs, printer spools

89
New cards

/tmp

temp files

90
New cards

/opt

file and larger software packages

91
New cards

/mnt

mount point for temp media like cd roms

92
New cards

/media

allows access to removable media

93
New cards

cd i.e. cd /home

change directory

94
New cards

ls

list

95
New cards

mv

move

96
New cards

cp

copy

97
New cards

rm

rename

98
New cards

rmdir

delete directory

99
New cards

pushd

add a directory on top of the stack

100
New cards

mount options: auto, noauto, nouser, user, exec, noexec, ro, rw, sync, async

different options for mounting