Flush Routing Table in Linux
Flush all routes
sudo ip route flush table main
ip route show
Empty a routing cache
sudo ip route flush cache
sudo ip route show cache
References
https://linoxide.com/how-to-flush-routing-table-from-cache/
Flush all routes
sudo ip route flush table main
ip route show
Empty a routing cache
sudo ip route flush cache
sudo ip route show cache
References
https://linoxide.com/how-to-flush-routing-table-from-cache/
var=$(command-name-here) var=$(command-name-here arg1) var=$(/path/to/command) var=$(/path/to/command arg1 arg2)
OR use backticks based syntax as follows to assign output of a Linux command to a variable:
var=`command-name-here` var=`command-name-here arg1` var=`/path/to/command` var=`/path/to/command arg1 arg2`
Examples
## store date command output to $now ## now=$(date)
## alternate syntax ## now=`date`
To display back result (or output stored in a variable called $now) use the echo or printf command:
echo "$now" printf "%s\n" "$now"
References
https://www.cyberciti.biz/faq/unix-linux-bsd-appleosx-bash-assign-variable-command-output/
echo 'someletters_12345_moreleters.ext' | cut -d'_' -f 2
output
12345
ip route show | grep default | cut -d' ' -f 3
output
178.134.45.216
References
https://stackoverflow.com/questions/428109/extract-substring-in-bash
Enable Hardware Acceleration
Disable Data Collection and Telemetry
Essential About:Config Tweaks
Remove Built-in Firefox Add-ons
References
https://www.makeuseof.com/tag/speed-up-firefox-immediately-with-these-6-simple-tweaks/
var options = ConfigurationOptions.Parse("localhost"); options.Password = "password"; ConnectionMultiplexer redisMultiplexer = ConnectionMultiplexer.Connect(options);
References
https://stackexchange.github.io/StackExchange.Redis/Basics
https://stackexchange.github.io/StackExchange.Redis/Configuration
https://stackoverflow.com/questions/23923247/password-for-redis-with-stackexchange-redis
sudo nano /etc/redis/redis.conf
# requirepass foobared
Uncomment it by removing the #
, and change foobared
to a secure password.
sudo systemctl restart redis.service
References
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04
mysql -u root # mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
ALTER USER 'newuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
exit
mongo
show dbs
use admin
db.createUser({user: "monitoringv5",pwd: "monitoringv5", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]})
exit
sudo nano /etc/mongod.conf
append this line :
security: authorization: enabled
sudo systemctl restart mongod
References
https://www.digitalocean.com/community/tutorials/how-to-secure-mongodb-on-ubuntu-20-04
sudo mysql
-- for MySQL ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; -- for MariaDB ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('root');
With a single query we are changing the auth_plugin
to mysql_native_password
and setting the root password to root and there isn’t any need to restart mysqld or start it with special privileges.
References
https://stackoverflow.com/questions/41645309/mysql-error-access-denied-for-user-rootlocalhost