1) If you want to run a command without saving it in history, prepend it with an extra space
2) history extra space then -d 421
3) To clear all your history, use
history -c
4) To delete a single line, use
history -d line-number
5) Also With Bash 5, you can delete a range as well
history -d 511-520
6) If you have hstr (a way better reverse-i-search that can be installed with sudo apt install hstr), then it's really simple:
1. Open your terminal and press Ctrl+r to search your history.
2. Type some characters to search for the command you want to delete from your history, then use the arrow keys to go down and highlight the item.
3. Press the delete key, and press y to confirm.
8) In Ubuntu (but I'm pretty sure, it will work for other Linux distributions and also MacOS the same way) the bash history file can be simply edited in an arbitrary text editor:
$ nano ~/.bash_history
If you don't know, where it's stored, you can find it as follows(create a history file then edit):
$ echo $HISTFILE
Or you can just do it a bit more generic way:
$ nano $HISTFILE
---------------------------------------------------------------------------------------------------------
----
Used tags:
----
tutorials, free, history, delete, command, cmd, Unix,Linux,Delete your terminal history,delete terminal history,technical fix,linux, history, kali Linux, terminal, command, how to remove kali linux command history, remove kali linux command history, how to delete kali linux command history, delete kali linux command history, delete kali linux terminal history, remove kali linux terminal history, history command, how to clear terminal history in kali linux, how to delete terminal history in kali Linux,how to remove or delete kali linux terminal command history,how to delete terminal history in linux
------------------------------------------------------------------------
links:
Link:
https://nilranbow.blogspot.com
Telegram channel link:
https://t.me/technorchid
Follow me on Twitter:
https://twitter.com/TechnOrchid
tips and tricks Facebook page:
https://www.facebook.com/technoorchid
-----------------------------------------------------------------------------------
To learn VHDL go to :
https://nilranbow.blogspot.com/2021/07/vhdl-total-vhdl-introduction-and-codes.html
Mind pixel for creative mind:
https://www.facebook.com/mindpixel01
Join Quora now:
https://subratastipstricks.quora.com/
--------------------------
Thanks for watching...
Тэги:
#command_prompt #how_to #kali_linux #technical_fix #linux #history #terminal #command #how_to_remove_kali_linux_command_history #remove_kali_linux_command_history #how_to_delete_kali_linux_command_history #delete_kali_linux_command_history #delete_kali_linux_terminal_history #remove_kali_linux_terminal_history #history_command #how_to_delete_terminal_history_in_kali_linux #how_to_remove_or_delete_kali_linux_terminal_command_history #tutorials #free #delete #cmd #unix