User Tools

Site Tools


linux

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux [2026/09/07 13:45] – reddylinux [2026/10/25 21:18] (current) – Added sysctl commands reddy
Line 152: Line 152:
 # Start with a GUI desktop # Start with a GUI desktop
 sudo systemctl set-default graphical.target sudo systemctl set-default graphical.target
 +</code>
 +
 +==== Disable SystemD Resolv from port 53 ====
 +
 +Edit /etc/systemd/resolved.conf 
 +<code>
 +#DNSStubListener=yes
 +DNSStubListener=no
 +</code>
 +
 +Then, restart the systemd-resolved service.
 +
 +==== Send SystemD Resolv requests to another DNS server ====
 +
 +In /etc/system/resolved.conf.d/otherservice.conf
 +<code>
 +[Resolve]
 +DNS=1.2.3.4
 +Domains=~mytest
 +</code>
 +
 +==== Scan for bad sectors ====
 +
 +<code>
 +badblocks -v /dev/sda1 > bs.txt
 +fsck -l bs.txt /dev/sda1  # -l adds adds the bad block list to the filesystem
 +
 +smartctl -H /dev/sda  # Perform health check
 +smartctl -A /dev/sda  # Look at Reallocated_Sector_CT and Current_Pending_Sector
 +</code>
 +
 +==== Grub Boot ====
 +
 +<code>
 +sudo grub-install --recheck /dev/sda
 +sudo update-grub
 +</code>
 +
 +==== Sysctl ====
 +
 +<code>
 +sysctl -a  # List all parameters
 +sysctl <param>  # List a specific parameter Eg. kernel.hostname, vm.swappiness
 +sysctl -w <param>=<value>  # Temporary change to parameter
 +sysctl -p <config_file>  # Reload from config (If no file specified, /etc/sysctl.conf)
 </code> </code>
  
linux.1788781548.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki