Linux Core Flashcards

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

1/124

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

125 Terms

1
New cards

Command to list directory contents

ls

2
New cards

Option to show long listing format with ls

ls -l

3
New cards

Option to list all files including hidden with ls

ls -a

4
New cards

Command to display current working directory

pwd

5
New cards

Command to change directory

cd

6
New cards

Change to parent directory

cd ..

7
New cards

Shortcut to home directory

cd ~

8
New cards

Reuse previous working directory

cd -

9
New cards

Command to create a file

touch

10
New cards

Command to create a directory

mkdir

11
New cards

Option to create parent directories as needed with mkdir

mkdir -p

12
New cards

Command to remove a file

rm

13
New cards

Command to remove directory recursively & force

rm -rf

14
New cards

Command to copy files

cp

15
New cards

Option for recursive copy

cp -r

16
New cards

Command to move/rename a file

mv

17
New cards

Command to display contents of file

cat

18
New cards

Command to concatenate multiple files into one

cat file1 file2 > combined.txt

19
New cards

Command to view file with pagination

less

20
New cards

Quick exit from less

q

21
New cards

Display first 10 lines of a file

head

22
New cards

Display last 10 lines of a file

tail

23
New cards

Follow log file in real time

tail -f

24
New cards

Search for pattern in files

grep "pattern"

25
New cards

Make grep case‑insensitive

grep -i

26
New cards

Count lines matching pattern

grep -c

27
New cards

Show line numbers with grep

grep -n

28
New cards

Search recursively with grep

grep -r "pattern"

29
New cards

Find files by name (current dir)

find . -name "*.txt"

30
New cards

Find and delete empty files

find . -type f -empty -delete

31
New cards

Search command history

Ctrl + r

32
New cards

Repeat last command

!!

33
New cards

Run previous command starting with string

!ls

34
New cards

Get help for a command

man

35
New cards

Quick help output (many commands)

--help

36
New cards

What does 'apropos' do

Search man page names/descriptions

37
New cards

Display path of executable

which

38
New cards

Show command location in PATH list

type -a

39
New cards

Print environment variables

printenv

40
New cards

Set environment variable for current session

export VAR=value

41
New cards

Change file permissions (symbolic)

chmod u+x

42
New cards

Change file permissions (numeric)

chmod 755

43
New cards

Change owner of file

chown

44
New cards

Change owner & group

chown :

45
New cards

Change group ownership

chgrp

46
New cards

Permission bits: read

4

47
New cards

Permission bits: write

2

48
New cards

Permission bits: execute

1

49
New cards

Special permission setuid value

4### (chmod 4755)

50
New cards

Octal 644 corresponds to

rw-r--r--

51
New cards

Symbolic to remove execute for others

chmod o-x

52
New cards

Command to change default perms mask

umask

53
New cards

Default umask for regular users

022

54
New cards

File that stores user accounts

/etc/passwd

55
New cards

File that stores encrypted passwords

/etc/shadow

56
New cards

Command to switch user

su -

57
New cards

Command to run cmd as root

sudo

58
New cards

File that configures sudo privileges

/etc/sudoers

59
New cards

Command to edit sudoers safely

visudo

60
New cards

Command to add user

sudo useradd

61
New cards

Show snapshot of current processes

ps aux

62
New cards

Show tree view of processes

pstree

63
New cards

Interactive process monitor

top

64
New cards

Improved top with colors & sorting

htop

65
New cards

Kill process by PID

kill

66
New cards

Force kill process

kill -9

67
New cards

Find PID by name

pgrep

68
New cards

Run command in background

&

69
New cards

Bring bg job to foreground

fg

70
New cards

List jobs in current shell

jobs

71
New cards

Nice value meaning

CPU scheduling priority

72
New cards

Change priority of running process

renice

73
New cards

Display system uptime and load

uptime

74
New cards

Check disk usage human readable

df -h

75
New cards

Check directory size summary

du -sh

76
New cards

Show memory usage

free -h

77
New cards

Display block device information

lsblk

78
New cards

Display mounted filesystems

mount | column -t

79
New cards

Mount ISO image

sudo mount -o loop cd.iso /mnt

80
New cards

Unmount filesystem

sudo umount /mnt

81
New cards

Show IP addresses (modern)

ip addr

82
New cards

Bring interface up

sudo ip link set eth0 up

83
New cards

Check network connectivity

ping

84
New cards

Traceroute to host

traceroute

85
New cards

DNS lookup command

dig

86
New cards

Simple HTTP request tool

curl

87
New cards

Transfer files over SSH

scp file user@host:/path

88
New cards

Secure shell login

ssh user@host

89
New cards

Package index update (Debian)

sudo apt update

90
New cards

Install package (Debian)

sudo apt install

91
New cards

Remove package (Debian)

sudo apt remove

92
New cards

Upgrade all packages (Debian)

sudo apt upgrade

93
New cards

Package manager for Red Hat

yum or dnf

94
New cards

Show package that owns a file (dpkg)

dpkg -S

95
New cards

List all installed packages (RPM)

rpm -qa

96
New cards

Enable a service with systemd

sudo systemctl enable

97
New cards

Start a service

sudo systemctl start

98
New cards

View service status

systemctl status

99
New cards

View systemd journal logs

journalctl -xe

100
New cards

Reboot the system

sudo reboot