Tag archives: Linux

RSS feed of Linux

Linux command history

[root@linux ~]# history [n]
[root@linux ~]# history [-c]
[root@linux ~]# history [-raw] histfiles

Parameters:

-n  :number, meaning ' the n command to list the most recent list ' means!

-c  :All the history in the current shell delete all content

-a  :Will be added into the history currently added instruction in histfiles, if not histfiles, then the ...

Continue reading

fedora mysql root Password Reset

1.Stop mysql service

[root@localhost han]#/etc/init.d/mysqld stop
Stop MySQL: [OK]

2.Start mysql service with the following command

[root@localhost han]#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

(Prompt message: [root@localhost han]# nohup: ignoring input and redirecting stderr to stdout Starting mysqld daemon with databases from /var/lib/mysql)

3 ...

Continue reading

linux vps iptables Firewall configuration shell

#!/bin/bash
echo "clean all rules before"
iptables -F
iptables -X

echo "setting up default rules"
iptables -P FORWARD ACCEPT
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT

echo "allow local address"
iptables -A INPUT -i lo -p all -j ACCEPT

echo "allow now connection"
iptables -A INPUT -p all -m state --state ESTABLISHED,RELATED ...

Continue reading