DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a virtual machine for kali-linux-2021.1 XFCE 4.16 64 bit. I found out that the history -c command to clear history, does not work in this version. Now, I run this command in the regular Debian 10.9 which is the latest version and others and it works just fine. See the attached screenshot for proof, please. Any ideas? Thanks for you time and help in advance. Have a nice day.
That command to clear history is a BASH shell command. make sure that you are in the BASH shell, and that the version is one that supports clearing command history that way. (Any current bash shell should, but I do not use KALI and do not know what shell you might be running.)
So look into why you're not using the history command that you want to use.
Is it an alias? Try:
Code:
which history
Also, try to figure out a way to
actually post the output, rather than a screen picture, which takes extra time to display. (I made a completely wrong guess about the problem until I took the time to look at the screenshot. From my post time to edit time you can see I missed the whole family feud show)
So look into why you're not using the history command that you want to use.
Is it an alias? Try:
Code:
which history
Also, try to figure out a way to
actually post the output, rather than a screen picture, which takes extra time to display. (I made a completely wrong guess about the problem until I took the time to look at the screenshot)
Here is the command output that you wanted. Any ideas? It is not resolved yet. Thanks for your time and help. Have a nice day.
Code:
┌──(maverick㉿TopGun)-[~]
└─$ which history
history: aliased to history 0
Last edited by linux1021; 04-02-2021 at 08:41 PM.
Reason: Specifying not resolved yet.
Your troubleshooting skills are admirable.
People who are getting help too often even do not look at the output of commands or examine the logs requested. They just dump it here and want someone else to look what's wrong. I resent that.
Your troubleshooting skills are admirable.
People who are getting help too often even do not look at the output of commands or examine the logs requested. They just dump it here and want someone else to look what's wrong. I resent that.
I indicated that the command still does not work, that is all. According to which history 0 still does not work. Do you have any idea? See below for proof.
Code:
┌──(maverick㉿TopGun)-[~]
└─$ history 0 -c
fc: too many arguments
Your troubleshooting skills are admirable.
People who are getting help too often even do not look at the output of commands or examine the logs requested. They just dump it here and want someone else to look what's wrong. I resent that.
+1 on that!
@OP: I gather you're expecting everything to work on Kali linux. How strange. Kali linux has one main use - pen testing via ethernet. That works, and the experts who do that don't have everything working. Read this thread https://www.linuxquestions.org/quest...ad-4175614092/ and install an OS where you currently have Kali if you want things to work. Kali is best seen as a tool, not an OS. The only time you should keep it is if you need to learn how to use the tool.
Thanks for the link !!! I saw a way to do it which is executing this command on the terminal:
Code:
echo "" > ~/.zsh_history & exec $SHELL -l
If you want to make it as a command, you can create an alias with these steps:
Code:
open ~/.zshrc
add the following line
alias clear_history='echo "" > ~/.zsh_history & exec $SHELL -l'
Save and close the file
Close the console or type zsh
if you to see the result directly, but this will open another zsh shell in the old one
Now you can clear the console typing clear_history
It is kind of workaround, but it works. Thanks for your time and help. Have a nice day.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.