I often use grep in Windows and Linux to find text in files. I have noticed that grep only works on traditional text files with .txt, .c, .cpp, .list, etc extensions. It doesn’t work with Markdown and C# text files and I find this frustrating.
I have found a parallel grep program in the Microsoft Learn code samples written by David Pine that overcomes the grep limitations.
The thing that I really like about this program is that I can use regular expressions in the search text.
I am used to gaining elevated privileges in Linux by adding sudo to a command e.g.
sudo apt-get update I wanted to stay in elevated privileges so I went to login as root and realised that my normal Linux account didn’t have root privileges.
I did some searching on the Internet and found that most versions of Linux disable the root account by default.
I found that you can enable root by running the following command.
I have been using the Windows Subsystem for Linux (WSL) for a number of years and just assumed that I was using WSL 2.
A quick check told me that I was definitely using WSL 2.
Note: I am using Powershell to check the version of WSL I have installed.
wsl --status Returned.
Default Distribution: Ubuntu-20.04
Default Version: 2
Windows Subsystem for Linux was last updated on 3/11/2021
I am using the bash shell in Windows WSL Linux. Currently I am using the Ubuntu 20.04, Debian and OpenSuse distributions.
The problem I have is that the default colour scheme has an ugly green background colour with blue text
This is a really disconcerting colour scheme!
I looked around for an alternative colour scheme to use and found that I could run a command to change the colours manually but each time I opened the terminal I would have to run the command again.
I am having real problems keeping my ASUS netbook running. It doesn’t have enough specs to run a lightweight version of Linux.
Increasing the size of the swapfile is supposed to improve the performance of low specced machines.
I have worked out how to change the swapfile size in the hope that it may help.
To check if you actually have a swapfile.
swapon -s This will either return nothing or detail the swapfiles statistics.
Creating a new installation of Linux on my notebook is a fairly complex process so these notes describe the whole process.
I need to download the latest version of Linux Mint from the Mint website as an ISO file.
Create a boot disk on a USB using Rufus. I am using an earlier version of Rufus (v 1.31.1320) because the later versions are thought to have adware built into them. Use the settings in the picture below.
Mint usually works with NTFS USB drives but if you can’t see the drive you can mount it yourself.
First run the command to see your hardware devices.
sudo fdisk -l At the Disk line
Disk /dev/sdb: 8004 Mb 8004304896 Bytes
This is the usb disk drive
At the Device Boot line you should see something like:
Device Boot Start End Blocks Id System /dev/sdb1 * 32 1234567 1234567 7 HPFS/NTFS/exFAT This will be another reference to the usb drive.