Linux "cover your tracks" Commands Flashcards

1
Q

Clear auth.log file

A

echo “” > /var/log/auth.log

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

Clear current user bash history

A

echo “” > ~/.bash_history

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

Delete .bash_history file

A

rm ~/.bash_history -rf

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

Clear current session history

A

history -c

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

Set history max lines to 0

A

export HISTFILESIZE=0

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

Set history max commands to 0

A

export HISTSIZE=0

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

Disable history logging (need to logout to take effect)

A

unset HISTFILE

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

Kills current session

A

kill -9 $$

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

Permanently send all bash history commands to /dev/null

A

ln /dev/null ~/.bash_history -sf

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