User Tools

Site Tools


tipsandtricks:others

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tipsandtricks:others [2021/11/16 12:20] – created patriktipsandtricks:others [2023/09/29 07:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +[[https://techwiki.keepthelogs.com | <== Back to menu]] \\
 +[[sections:tipsandtricks|<= Back]]
  
 +====== Other tips and tricks ======
 +//
 +by Patrik Hermansson
 +//
  
  
  
 +  * [[others#Remove Terminal history| Remove Terminal history ]]
  
  
 +=== Remove Terminal history ===
 In Bash (the terminal) the commands are saved in the .bash_history file. If you write usernames and passwords in the terminal those are saved as commands in that file. In clear text! In Bash (the terminal) the commands are saved in the .bash_history file. If you write usernames and passwords in the terminal those are saved as commands in that file. In clear text!
 Password without echo (when you do not see the text) are not saved. Only the character that you see.  Password without echo (when you do not see the text) are not saved. Only the character that you see. 
Line 11: Line 18:
       history -c       history -c
       history -w       history -w
--c == clear the history list by deleting all entries. + 
--w == writes over the .bash_history file with the empty list thereby clearing it.+  The flag -c == clear the history list by deleting all entries. 
 +  The flag -w == writes over the .bash_history file with the empty list thereby clearing it. 
 The commands you write in the active (open) window will be saved in memory and written in the file on exit/logout. You can see all commands in “memory” by using the command history without any flags. The commands you write in the active (open) window will be saved in memory and written in the file on exit/logout. You can see all commands in “memory” by using the command history without any flags.
 +
  
tipsandtricks/others.1637065207.txt.gz · Last modified: 2023/09/29 07:01 (external edit)