Showing posts with label system administration. Show all posts
Showing posts with label system administration. Show all posts

2024-08-05

How To Install Synaptic Package Manager on Ubuntu 24.04

Install Synaptic

Open Terminal and type the following command line followed by Enter.

$ sudo apt-get install synaptic apt-xapian-index software-properties-gtk

It will install three packages "synaptic" the application, "apt-xapian-index" search functionality, and "software-properties-gtk" the repository settings.

Full article:

Tool of choice - aptitude (CLI)

For a long time I was using aptitude with great success. I can't even remember how many broken Debian and Ubuntu installations I was able to fix with aptitude. Problem resolution, dependency search, package selection, undo function (very important!), etc.

The aptitude program runs from command-line, so when a problem arises and system cannot boot into graphical mode, this is really THE BEST. And I mean that.

Tool of choice - synaptic (GUI)

Second in line is of course synaptic which runs in graphical mode. It is partially similar to aptitude, but offers greater flexibility than basic Ubuntu software management and update utilities. For me this is the SECOND BEST so far.

Yet I have never used packages recommended in the article:

  • apt-xapian-index and
  • software-properties-gtk.

This is something to look into, and a reason for this very post.

And whenever something goes really bad, there is always (you guessed it) aptitude.

2023-10-04

How To Upgrade To Debian 12 Bookworm From Debian 11 Bullseye

Recenly I wanted to upgrade one of my virtual machines from Debian 11.1 (bullseye) to Debian 12 (bookworm). But how to do that when it is not Ubuntu, which I use quite often?

Well, I have found a very informative tutorial, step by step - with almost guaranteed success ratio ;-)

See more:
https://ostechnix.com/upgrade-to-debian-12-from-debian-11/

2023-05-05

Secure Apache with Let's Encrypt on Ubuntu 22.04

TUTORIAL: How To Secure Apache with Let's Encrypt on Ubuntu 22.04

Perfect tutorial with perfect outcome! The crucial thing is indeed to have VirtualHost configured on HTTP port 80 in Apache first. With these instructions getting auto-renewable SSL certificate for a website is really easy. Big THANK YOU to the authors :)

2023-01-16

How to find files modified last month

Very interesting use of Linux date program, especially parameters to calculate start of last month. It's clever and it works!
find . -type f -name '*.php' -newermt "$(date -d "$(date +%y-%m-1) - 1 month" +%y-%m-%d)"

2022-09-21

Install Google Chrome on Ubuntu 20.04

New virtual machine and new Kubuntu installation. Good days ahead again!

I just found out that old ways of using apt-key program are replaced in new Ubuntu Linux releases by Apt directory /etc/apt/trusted.gpg.d/. It is similar to another Apt directory /etc/apt/sources.list.d/ with files describing software repositories.
Good opportunity to learn something new :)

To install official Google Chrome including automatic updates, I used following tutorial:

Install Google Chrome on Ubuntu 20.04

2021-11-10

How to restore full context menus in Windows 11

Original article:

Related blog post:

Registry files
win11_classic_context_menu.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}]
@=""

[HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
@=""
undo_win11_classic_context_menu.reg
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}]

2020-12-20

Keyboard without AltGr - now what?

Recently I found myself using temporarily a keyboard without "right Alt" key, also called "AltGr" (graphical Alt). However I needed that to work to enter characters in the locale I am in.
So I thought: is there any hope? SharpKeys to the rescue!

TL;DR

I ended up with single entry in the Windows Registry, with necessary system restart afterwards. Then to my surprise IT JUST WORKED! (TM) 😁

Following is the exported registry data with Scancode Map key:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,38,e0,5d,e0,00,00,00,00

References:

2020-09-25

Windows 10 JumpListItems_Maximum

In the Registry Editor, use the left sidebar to navigate to the following key:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Right-click the Advanced folder and choose New > DWORD (32-bit) Value. Name the new value JumpListItems_Maximum and then double-click the value to open its properties window.

In the value’s properties window, select “Decimal” under Base and then enter the number of recent items you want your jumplists to show in the “Value data” box. We’ve found that 15-20 is a pretty good number that still lets the whole jump list show on most displays.

https://www.howtogeek.com/267705/how-to-increase-the-number-of-jump-list-items-in-windows-10/

2018-07-29

How to Rebuild BCD in Windows

A long day of searching (which is typical) for how to fix the non-booting Windows 10 installation.

Eventually I've found the following procedure, which simply just worked.
The best thing only the Option 1 (the simplest) was necessary in my case :)

  1. Start Advanced Startup Options if you're using Windows 10 or Windows 8.
    Start System Recovery Options if you're using Windows 7 or Windows Vista.
  2. Open Command Prompt from Advanced Startup Options or System Recovery Options menu.
  3. At the prompt, type the bootrec command as shown below and then press Enter:
    bootrec /rebuildbcd
    
    The bootrec command will search for Windows installations not included in the BCD and then ask you if you'd like to add one or more to it.
  4. You should see one of the following messages at the command line.

    1. Option 1
      Scanning all disks for Windows installations.
      Please wait, since this may take a while...
      Successfully scanned Windows installations.
      Total identified Windows installations: 0
      The operation completed successfully.
      
      Option 2
      Scanning all disks for Windows installations.
      Please wait, since this may take a while...
      Successfully scanned Windows installations.
      Total identified Windows installations: 1
      [1] C:\Windows
      Add installation to boot list? Yes/No/All:
      
    2. If you see Option 1: Move on to Step 5. This result most likely means that Windows installation data in the BCD store exists but bootrec couldn't find any additional installations of Windows on your computer to add to the BCD. That's fine; you'll just need to take a few extra steps to rebuild the BCD.
    3. If you see option 2: Enter Y or Yes to the Add installation to boot list? question, after which you should see The operation completed successfully, followed by a blinking cursor at the prompt. Finish up with Step 10 toward the bottom of the page.

Read the whole post:
https://www.lifewire.com/how-to-rebuild-the-bcd-in-windows-2624508

2018-06-11

Safely Remove Unused Kernels In RHEL/CentOS/Fedora

There are three main ways to do it:

  1. Use package-cleanup command from yum-utils
  2. Use Fedora's dnf remove combined with dnf repoquery
  3. Set maximum number of installed kernels in /etc/yum.conf file
First:
# yum install yum-utils
# package-cleanup --oldkernels --count=2
Second:
# dnf remove $(dnf repoquery --installonly --latest-limit 2 -q)
Third:
# vim /etc/yum.conf
installonly_limit=3  #set kernel count

See also:

2018-04-28

Try changing HPET settings to improve your PC's performance

You need to run the following commands on the command line in Windows to enable or disable the exclusive use of the HPET timer.
  • Tap on the Windows-key, enter cmd, right-click cmd.exe in the results listing and select to run the command prompt with administrative privileges.
  • To enable HPET as the only timer run the command:
    bcdedit /set useplatformclock true
  • To disable HPET in Windows run the command:
    bcdedit /deletevalue useplatformclock
https://www.ghacks.net/2013/04/18/try-changing-hpet-settings-to-improve-your-pcs-performance/

AnandTech article about impact of High Performance Event Timer (HPET)
A Timely Discovery: Examining Our AMD 2nd Gen Ryzen Results

2018-02-22

The Pros and Cons of Windows 10’s "Fast Startup" Mode

Why You Might Want to Disable Fast Startup

[...] Fast Startup also has its problems, so you should take the following caveats into consideration before enabling it:

  • When Fast Startup is enabled, your computer doesn’t perform a regular shut down. Since applying new system updates often requires a shutdown, you may not be able to apply updates and turn your computer off. Restart is unaffected, though, so it still performs a full cold shutdown and restart of your system. If a shutdown doesn’t apply your updates, a restart still will.
  • Fast Startup can interfere slightly with encrypted disk images. Users of encryption programs like TrueCrypt have reported that encrypted drives they had mounted before shutting down their system were automatically remounted when starting back up. The solution for this is just to manually dismount your encrypted drives before shutting down, but it is something to be aware of. (This doesn’t affect the full disk encryption feature of TrueCrypt, just disk images. And BitLocker users shouldn’t be affected.)
  • Systems that don’t support hibernation won’t support Fast Startup either. Some devices just don’t play well with hibernation. You’ll have to experiment with it to see whether your devices respond well or not.
    When you shut down a computer with Fast Startup enabled, Windows locks down the Windows hard disk. You won’t be able to access it from other operating systems if you have your computer configured to dual-boot. Even worse, if you boot into another OS and then access or change anything on the hard disk (or partition) that the hibernating Windows installation uses, it can cause corruption. If you’re dual booting, it’s best not to use Fast Startup or Hibernation at all.
  • Depending on your system, you may not be able to access BIOS/UEFI settings when you shut down a computer with Fast Startup enabled. When a computer hibernates, it does not enter a fully powered down mode. Some versions of BIOS/UEFI work with a system in hibernation and some do not. If yours doesn’t, you can always restart the computer to access BIOS, since the restart cycle will still perform a full shutdown.
https://www.howtogeek.com/243901/the-pros-and-cons-of-windows-10s-fast-startup-mode/


2017-03-12

Clear the Windows Update Download cache

You probably need to clear the Windows Update Download cache (I had to do this to get 15046 to appear).

net stop wuauserv
cd %systemroot%\SoftwareDistribution
rmdir /S /Q Download
net start wuauserv
net stop bits
net start bits
net stop cryptsvc
cd %systemroot%\system32
rmdir /S /Q catroot2
net start cryptsvc


Reboot.

https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_install/install-of-15042-reboots-at-71-to-15031/a640c8f4-b93c-46fb-9aee-4d302f00eadf

2017-03-11

"Reclaim Windows 10"

Brilliant :)
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)

Original: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1

Advertising in Windows Explorer (Win10)

Advertising in Windows has reached an exasperating new low

Blinken

How to turn it off:
In File Explorer go to View > Options > Change Folder and search options.
Go to the View tab and scroll down about 3/4 of the way and turn off the option for 'Show sync provider notifications'.

https://arstechnica.com/information-technology/2017/03/microsoft-put-gross-ads-in-windows-explorer-and-i-dont-have-the-energy-to-be-angry/?comments=1&post=32960539

Dual-boot Ubuntu and real-time clock

It's almost as natural as disabling timedatectl set-local-rtc on Ubuntu dual-boot machines at this point.

https://arstechnica.com/information-technology/2017/03/microsoft-put-gross-ads-in-windows-explorer-and-i-dont-have-the-energy-to-be-angry/?comments=1&post=32960205

2016-01-04

Configure vhosts for XAMPP in Ubuntu

After installing XAMPP for Linux I wanted to use my old trick of configuring virtual hosts for Apache.
There is a one-time configuration, and two steps for each virtual host.

One-time configuration is needed to actually use virtual hosts, and to restore access to original XAMPP documents. So here it goes:

1. Open terminal and edit httpd.conf file:
$ sudo nano /opt/lampp/etc/httpd.conf
2. Now find the following line and uncomment it by removing the hash symbol (#) at the beginning:
Include etc/extra/httpd-vhosts.conf
3. Edit httpd-vhosts.conf file:
$ sudo nano /opt/lampp/etc/extra/httpd-vhosts.conf
4. Replace definitions for dummy-host.example.com and dummy-host2.example.com with following:
# Use name-based virtual hosting.
NameVirtualHost *:80

<VirtualHost *:80>  ## Restore access to localhost resources
    DocumentRoot    "/opt/lampp/htdocs/"
    ServerName      localhost
</VirtualHost>

<VirtualHost *:80>  ## Restore access to 127.0.0.1 resources
    DocumentRoot    "/opt/lampp/htdocs/"
    ServerName      127.0.0.1
</VirtualHost>
5. Restart Apache or reload its configuration. Then check if you can still access XAMPP Dashboard at:
http://localhost and http://127.0.0.1
6. Prepare directory for future virtual hosts, and give your user's group write access to it:
$ sudo mkdir /opt/lampp/vhosts
$ sudo chgrp $(id -n -g) /opt/lampp/vhosts
$ sudo chmod g+rwx /opt/lampp/vhosts

For each virtual host, name resolver needs to be informed about new local domain.
Then virtual host definition has to be added, and directory for host's files created.
Finally after Apache restart all should work.

7. Edit local name resolver hosts file:
$ sudo nano /etc/hosts
8. Add local/development domain, for example "helloapp":
127.0.0.1    helloapp
9. Edit httpd-vhosts.conf file:
$ sudo nano /opt/lampp/etc/extra/httpd-vhosts.conf
10. Add virtual host, setting correctly paths and names:
<VirtualHost *:80>
    DocumentRoot "/opt/lampp/vhosts/helloapp"
    ServerName   helloapp
    ErrorLog     "logs/helloapp-error.log"
    CustomLog    "logs/helloapp-access.log" combined

    # The same settings as for <Directory "/opt/lampp/htdocs"> in conf/httpd.conf
    <Directory "/opt/lampp/vhosts/helloapp">
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        Options Indexes FollowSymLinks ExecCGI Includes
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        AllowOverride All
        # Controls who can get stuff from this server.
        Require all granted
    </Directory>
</VirtualHost>
11. Prepare directory for virtual host, remember about correct path:
(this works only if step 6. has been done, otherwise permission errors can occur)
$ mkdir /opt/lampp/vhosts/helloapp
12. Restart Apache or reload its configuration. Then check if you can access new virtual host at:
http://helloapp

See also: