Author: Alex

LMDE 5 beta loaded on mirrors

Download links for LMDE 5 Beta:

If the links do not open, then go to http://ftp.crifo.org/mint-cd/testing/ and select the version you need.

The LMDE project is ongoing. LMDE stands for Linux Mint Debian Edition and is about creating a distribution that is almost identical to Linux Mint but based on Debian and not Ubuntu. This is an interesting exercise because it forces the developers of Linux Mint to test the compatibility of a software stack written specifically for Linux Mint with Debian and shows how much of it is specific to Ubuntu and how much is generic to Debian.

The Ubuntu distribution has many of its own developments and is quite different from Debian. And not all features of Ubuntu users perceive positively. Many users like classic Debian without the forced services.

Work on LMDE 5 began in early January. LMDE 4 was already on par with the Mint, Xapp and Cinnamon stacks introduced in 20.2. LMDE 5 has been updated to Linux Mint 20.3.

Although in general LMDE is very similar to Linux Mint, there are differences too. Debian features newer software compared to Ubuntu 20.04 and Ubuntu in general. This is why LMDE provides users with more recent packages and gives Linux Mint developers the opportunity to test their software on the next generation of Linux. This gives an idea of some of the issues developers will face in Linux Mint 21. It helps them prepare for the next release.

On the presented BETA, all backports and packages are ready. The LMDE 5 ISO downloads and installs fine. There are no obvious critical issues.

What files can be deleted when there is not enough disk space in Linux

There are situations when the disk space has run out completely and you need to urgently clean the disk and delete files. Disk space may run out even so that

  • when trying to clear the installation package cache, the system will report an error (there is no place even to save the lock file),
  • when trying to install ncdu to search for overgrown folders and files, the system will not be able to find even the 81 kilobytes required for this command
  • when trying to find the files and folders that take up the most space in Linux, the system will also give an error due to the fact that the sort command will not be able to save the data cache to disk if there is a lot of this data

That is, there are really critical situations – in these conditions, many programs and services stop working normally. Therefore, the task becomes the following: urgently at any cost to free up disk space so that you can continue servicing the system and proceed to the second stage – searching for directories and files that led to this problem due to the fact that they began to take up too much space.

I will warn you in advance: the following commands, although they mainly delete useless files, after their execution can lead to the following consequences:

  • the services will need to be restarted for them to work properly (so that they re-create the log files, caches, lock files)
  • various logs and files from the recycle bin may be lost, which, although not needed by most users, in some conditions you may want to keep them (for example, it is important for you to examine the log files, as they may be the cause of the problem).

This means that DO NOT mindlessly copy commands – read the explanations for them and evaluate how painless they are for your situation.

1. Deleting temporary files

The files in the /tmp/ directory will be deleted anyway on the next system reboot. That is, on the one hand, they can be removed quite painlessly:

sudo rm -rf /tmp/*

BUT: programs that are currently running and that have saved some data to the /tmp/ directory may be broken.

2. Deleting cache files

The /var/cache/ directory has many subdirectories that can be deleted almost painlessly (data will not be lost, and programs will create new cache files). This directory is of particular interest because on some systems caches grow to gigabytes and tens of gigabytes. Sometimes looking for a problematic directory in /var/cache/ can finally solve a situation with a lack of disk space.

To remove the font cache:

sudo rm -rf /var/cache/fontconfig/

To remove the installation package cache (on Debian, Linux Mint, Ubuntu, Kali Linux and derivatives):

sudo rm -rf /var/cache/apt/

To remove the installation package cache (on Arch Linux, BlackArch and their derivatives):

sudo rm -rf /var/cache/pacman/

Deleting the man page cache:

sudo rm -rf /var/cache/man/

You can continue searching for large caches applicable to the software installed on your system. For example, these can be web server caches, proxy servers, etc.

3. Delete logs

In this directory (/var/log/) you can delete almost all files, but try to keep the folder structure, because some applications, after deleting a directory here, are not able to create it a second time…

On web servers, the web server logs can grow too large.

To remove Apache logs on Debian, Linux Mint, Ubuntu, Kali Linux and derivatives:

sudo rm -rf /var/log/apache2/*

To remove Apache logs on Arch Linux, BlackArch and their derivatives:

sudo rm -rf /var/log/httpd/*

In order for the server to start creating and writing to new log files, the Web Server service must be restarted.

Depending on the intensity of system usage, the accumulated logs can take up gigabytes. Depending on the system, the files may have different names, a more accurate analysis is recommended to be performed using the ncdu utility:

sudo ncdu /var/log/

4. Empty the trash

This tip is more for desktop systems. The files you deleted in the desktop GUI end up in the ~/.local/share/Trash/files/ folder, you can analyze them and delete them (second time) if you wish:

ncdu ~/.local/share/Trash/files/

5. Remove unnecessary kernel header source code files

The following is only relevant for Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives. Check the /usr/src/ folder, there will be subfolders like linux-headers-; most of them can be deleted – leave only the one whose number corresponds to the current kernel of the system – this is usually the most recent release number.

6. Remove orphaned packages

Orphaned packages are those packages (programs) that were installed as dependencies for other programs. But for various reasons, they are no longer needed: either the program that used them was removed, or for that program they ceased to be dependencies after updating the program.

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can remove unnecessary packages as follows:

sudo apt autoremove

For Debian and derivatives, the previous command is completely safe.

On Arch Linux and derivatives, the list of orphaned packages can be seen as follows:

pacman -Qdt

Before proceeding with their automatic removal, it is highly recommended to study this list!

To recursively remove orphans and their config files on Arch Linux and derivatives:

sudo pacman -Rns $(pacman -Qtdq)

If no orphaned packages were found, pacman will exit with an “error: no targets specified (use -h for help)”. This is expected since pacman -Rns took no arguments.

7. Clean up systemd logs

Over time, in some systems, the system logs begin to take up gigabytes on the hard drive. You can view the logs and free up space using the journalctl command.

To see how much space the logs are taking up, run:

journalctl --disk-usage

To remove all entries, leaving only entries per 100 megabytes, run:

journalctl --vacuum-size=100M

Or to delete all system log entries older than one week:

journalctl --vacuum-time=1weeks

8. Files in the /lost+found directory

The /lost+found directory contains files that were found after checking the disk file system. Typically, such checks are performed after a sudden reboot of the system or if there are signs of disk problems.

The files found are usually corrupted. Their goal is to save data that, if errors were corrected on the file system, would be completely lost.

The /lost+found folder may be empty (if there were no problems with the disk). If there are files there, then you can view them and, if desired, delete them.

9. Clean up PHP sessions

Sometimes web applications can create countless sessions due to a bug. Check the /var/lib/php/sessions/ directory for too many files.

(BONUS) 10. Analyze Docker Files

Don't mindlessly delete Docker files. I'm giving this directory as an example only because it caught my attention because of its sheer phantasmagoric size – and this despite the fact that I don't actually use Docker – I literally tried it several times to see what it is.

The largest folder is /var/lib/docker/overlay2/. To analyze disk space occupied, run:

sudo ncdu /var/lib/docker/

Conclusion

So, we have considered which files can be deleted from Linux with little or no loss of information. In addition to the directories discussed, which can be cleared both on a remote system with a web server and on a home computer, users with a graphical desktop should pay attention to such directories as:

  • ~/.cache
  • ~/.local
  • ~/Downloads (your downloaded files)

They do NOT need to be removed, but worth analyzing. For example, you may find out that the web browser on your computer has a cache of several gigabytes and that you can free them (it is recommended to do it using the web browser, rather than deleting files directly).

If I missed any directories with files that can be safely deleted, then write them in the comments!

Internet via Bluetooth in Linux: how to set up and why the speed is slow

In this tutorial, you will learn how to set up an Internet connection via Bluetooth in Linux, as well as why the Internet speed via Bluetooth is slow.

How to connect my computer to the Internet through my phone via Bluetooth

Internet via Bluetooth is one of the options for using a mobile phone to access the Internet from a computer. Looking ahead, we note that this is not the best option because:

1) the connection speed will be quite slow,

2) the setup, although generally simple, is slightly more complicated than other connection options

As alternative methods for accessing the Internet from a computer via a mobile phone, the following are recommended:

If your computer does not have Wi-Fi and you do not have a USB data cable for connecting your phone by wire, then the method described in this article is suitable for you – accessing the Internet via the mobile phone's Bluetooth tethering.

The connection algorithm is as follows:

  1. Pairing your phone and computer via Bluetooth
  2. Turning on the Bluetooth tethering on the phone
  3. Setting up a computer, which consists in connecting to the phone's Bluetooth tethering (selecting Bluetooth as the Access point)

So, let's look at how to connect a computer to the Internet through Bluetooth and your mobile phone in Linux.

Checking and starting the Bluetooth service

Connecting a mobile phone to a computer via Bluetooth is called pairing.

Check if the Bluetooth service is running on your computer – to do this, connect your Bluetooth device (if it is disconnected) and look for the Bluetooth icon next to the clock:

The Bluetooth service status can be checked on the command line:

systemctl status bluetooth

If the status of the service is other than “active (running)” and you do not see the Bluetooth tray icon, then you need to execute the following commands from this section. If the service is running, skip the following commands and skip directly to the next section to pair your phone with your computer.

Install required packages in Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives:

sudo apt install bluez blueman

Install required packages in Arch Linux, Manjaro, BlackArch and their derivatives:

sudo pacman -S bluez bluez-utils pulseaudio-bluetooth blueman

The following commands are the same for all distributions.

Start bluetooth service:

sudo systemctl start bluetooth

Adding it to startup:

sudo systemctl enable bluetooth

Connecting a mobile phone to a computer via Bluetooth (phone pairing)

Turn on Bluetooth on your mobile phone.

Both a mobile phone and a computer can initiate pairing.

On your mobile phone or computer, search for Bluetooth devices.

If the devices do not see each other, then start searching for devices at the same time on the computer and mobile phone.

When the desired device is found, click on it to start pairing.

A prompt will appear on your mobile phone to establish pairing – agree to this proposal.

   

After that, on the computer it will be proposed to pair with the phone – agree (“Confirm”). If you are prompted to connect by someone else's device, then reject the request (“Deny”).

Immediately after pairing, or at the next connection, an authentication request will be made – the options are “Always accept” and “Accept”. The “Deny” button means rejecting the request.

After pairing, and also if you have selected the “Always accept authentication” option, the devices will connect to each other automatically as soon as Bluetooth is enabled on them.

Turning on the Bluetooth tethering

Go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “Bluetooth tethering”.

   

Connect to a Bluetooth tethering on a computer

Your computer's network settings should now show an option for Bluetooth, Mobile broadband, or similar.

Activate this connection so that the computer starts using the Internet via Bluetooth.

You can turn on the Bluetooth connection directly on the computer, bypassing the steps to turn on the Bluetooth tethering on the phone as shown above – in this case, the phone will prompt you to Allow Bluetooth tethering.

Why is the Internet speed slow over Bluetooth

When successfully connecting to the Internet via Bluetooth, the first thing you may notice is the speed of the connection. On the most modern Bluetooth 5.* protocols, it is up to 1.4 megabits per second (2 megabits per second at the moment). As you can see from the screenshot, the speedtest.net Internet connection speed test showed a speed of 1.66 megabits per second.

This is 210-220 kilobytes per second, if these units are more familiar to you. This is very slow, and on Bluetooth versions 4.* the speed is only 800 kilobits per second, that is, 2 times slower.

See also: How to find out the Bluetooth version for the adapter and peripherals in Linux

Thus, if the speed of the Internet via Bluetooth is too slow for you, all you can do to increase the speed of the Internet via Bluetooth is to switch to the Bluetooth 5.* protocol (both devices – the phone and the computer – must support this protocol). If this speed is not enough for you, then use Wi-Fi or data transfer via USB:

How to use an Android phone to access the Internet on a computer without Wi-Fi in Linux

In the article “How to share mobile Internet with other phones and computers”, we already talked about how to use a mobile phone as an Access Point, but what if the computer does not have a Wi-Fi adapter or drivers are not installed for it?

This article is devoted to the answer to this question – it tells how to connect a computer to the mobile Internet using a USB cable.

In fact, this method is even simpler than creating a mobile hotspot.

How to Use Android Phone as USB Tethering in Linux

As you can see in the screenshot, the computer does not have an Internet connection.

Start by connecting your phone to your computer with a USB cable.

Then go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “USB tethering”.

Everything is ready – now your computer is online and can connect to the Internet. You can install Wi-Fi drivers or perform other network actions that you need.

No additional configuration is required on the computer. Now the computer is connected to the network – the USB tethering connection has a wired connection icon.

What to do if the USB modem item is not active or missing

The USB modem item may be inactive in two cases:

  1. The phone is not connected to the computer with a USB cable.
  2. USB cable does not support data transfer

Try another USB cable – the one that came with the phone should support data transfer.

Things to remember when using a mobile phone for the Internet

  1. Please note that if the phone is not connected to Wi-Fi, then mobile data will be used – if you do not have an unlimited data plan, then this will cost you money.
  2. You can connect your phone to a Wi-Fi network and still use it as a USB modem. The result is that your computer is using Wi-Fi through your phone, and not mobile data.
  3. If, when you turn on the USB modem, there is still no Internet access on the computer, then check if other network connections are disabled: for example, via Wi-Fi or by wire, the computer can be connected to a router that does not have Internet (disabled for non-payment or damaged cable).
  4. If you disconnect the phone from the USB cable, and then connect it to the computer again, you will need to turn USB tethering on again in the phone each time
  5. While the mobile phone is operating as a USB modem, you cannot send and receive files from it

How to enable file transfer between computer and phone

When the USB modem is enabled, it is not possible to exchange files between the computer and the phone.

In order to make it possible to copy files, you can disconnect the phone from the computer, and then reconnect and, when asked for permission to transfer files, provide it.

Another option is to disable the USB modem and enable data transfer (or only charging) in the phone settings without disconnecting it from the USB cable. To do this, open the curtain and expand the notification “USB tethering turned on”.

Click to configure the USB connection to the corresponding label.

Instead of “USB tethering” select “USB tethering” or “Charging phone only”.

How to connect a computer to the Internet via Bluetooth in Windows

Table of contents

1. How to connect my computer to the Internet through my phone via Bluetooth

2. Connecting a mobile phone to a computer via Bluetooth (phone pairing)

3. Turning on the Bluetooth tethering

4. Connect to a Bluetooth tethering on a computer

5. How to Disconnect from a Bluetooth Connection

5.1 To turn off Bluetooth Internet on a computer

5.2 To turn off Bluetooth Internet on your mobile phone

6. “The connection with the Bluetooth network device failed” error

7. Why is the Internet speed slow over Bluetooth


In this tutorial, you will learn how to set up an Internet connection via Bluetooth in Windows, as well as why the Internet speed via Bluetooth is slow.

1. How to connect my computer to the Internet through my phone via Bluetooth

Internet via Bluetooth is one of the options for using a mobile phone to access the Internet from a computer. Looking ahead, we note that this is not the best option because:

1) the connection speed will be quite slow,

2) the setup, although generally simple, is slightly more complicated than other connection options

As alternative methods for accessing the Internet from a computer via a mobile phone, the following are recommended:

If your computer does not have Wi-Fi and you do not have a USB data cable for connecting your phone by wire, then the method described in this article is suitable for you – accessing the Internet via the mobile phone's Bluetooth tethering.

The connection algorithm is as follows:

  1. Pairing your phone and computer via Bluetooth
  2. Turning on the Bluetooth tethering on the phone
  3. Setting up a computer, which consists in connecting to the phone's Bluetooth tethering (selecting Bluetooth as the Access point)

So, let's look at how to connect a computer to the Internet through Bluetooth and your mobile phone in Windows.

2. Connecting a mobile phone to a computer via Bluetooth (phone pairing)

Turn on Bluetooth in Windows if you haven't already. This can be done by clicking on the network connection button next to the clock.

In Windows, right-click on the Bluetooth icon and select “Go to Settings” from the context menu that opens.

Click the “Add device” button.

In the window that opens, select “Bluetooth”.

Turn on Bluetooth on your mobile phone.

Start Scan for Bluetooth devices.

If the devices do not see each other, then start searching for devices at the same time on the computer and mobile phone. If you don't succeed the first time, try again.

When the desired device is found, click on it to start pairing.

Do the same on the computer.

A prompt will appear on your mobile phone to establish pairing – agree to this proposal.

Do the same on the computer – click the “Yes” button.

Make sure the connection was successful.

If the connection fails, try again.

3. Turning on the Bluetooth tethering

Go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “Bluetooth tethering”.

   

4. Connect to a Bluetooth tethering on a computer

Right-click on the “Network” icon and select “Network and Internet settings” in the context menu that opens.

In the window that opens, select “Advanced network settings”.

Then select “More network adapter options”.

In the Network Connections window, find Bluetooth Network Connection, right-click it and select View Bluetooth Network Devices.

In the “Devices and Printers” window that opens, find the phone, right-click on it. In the context menu, select “Connect using” and select “Access point” in the list that opens.

After that, the computer will be connected to the Internet via the Bluetooth of the mobile phone.

5. How to Disconnect from a Bluetooth Connection

To turn off Bluetooth Internet on a computer

Right-click on the “Network” icon (next to the clock) → Advanced network settings → More network adapter options → Right-click on “Bluetooth Network Connection” → select “View Bluetooth Network Devices” from the context menu.

In the “Devices and Printers” window that opens, find the phone, right-click on it. Select “Disconnect from device network” from the context menu.

To turn off Bluetooth Internet on your mobile phone

Go to Settings → Connections → Bluetooth.

Click on the gear of the connection you are using.

Turn off “Internet connection sharing”.

6. “The connection with the Bluetooth network device failed” error

At the stage “4. Connect to a Bluetooth tethering on a computer” you may encounter an error:

The connection with the Bluetooth network device failed. The device may already be connected to another computer, or it may need to be configured to accept connections from this computer. Consult your device documentation for further information.

It usually means that you did not follow the steps described in step “3. Turning on the Bluetooth tethering”.

On the phone, you will be prompted to “Allow Bluetooth tethering”, if you select “Allow”, then the reconnection will be successful.

7. Why is the Internet speed slow over Bluetooth

When successfully connecting to the Internet via Bluetooth, the first thing you may notice is the speed of the connection. On the most modern Bluetooth 5.* protocols, it is up to 1.4 megabits per second (2 megabits per second at the moment). As you can see from the screenshot, the speedtest.net Internet connection speed test showed a speed of 1.66 megabits per second.

This is 210-220 kilobytes per second, if these units are more familiar to you. This is very slow, and on Bluetooth versions 4.* the speed is only 800 kilobits per second, that is, 2 times slower.

See also: How to check Bluetooth version in Windows

Thus, if the speed of the Internet via Bluetooth is too slow for you, all you can do to increase the speed of the Internet via Bluetooth is to switch to the Bluetooth 5.* protocol (both devices – the phone and the computer – must support this protocol). If this speed is not enough for you, then use Wi-Fi or data transfer via USB:

How to connect your phone to the Internet using another phone’s Bluetooth

How to share mobile Internet for another phone via Wi-Fi and Bluetooth

Using Bluetooth, a mobile phone can share the Internet (share an Internet connection) with another phone or computer. The speed of Bluetooth is quite slow, so it is recommended to create a mobile Wi-Fi hotspot on your phone and distribute the Internet through it, see how to do this in the article “How to share mobile Internet with other phones and computers”.

If Wi-Fi for some reason does not suit you, then you can distribute the Internet via Bluetooth. Scenario example: An Internet donor phone is connected via Wi-Fi to an Access Point. You need to connect a second phone to the Internet, but you can't or don't want to do it over Wi-Fi. In this case, as a temporary connection, you can distribute the Internet via Bluetooth.

How to share the Internet via Bluetooth

Start by pairing phones via Bluetooth.

To do this, turn on Bluetooth on both phones and click the “Search” button.

To go to the Bluetooth settings, press and hold the Bluetooth icon that you previously used to turn on Bluetooth.

In the Available devices list, select the phone you want to pair with.

On both phones, tap “Pair”.

After that, on the phone that you want to connect via Bluetooth to the Internet, click the gear icon opposite the donor phone that will distribute the Internet.

In the window that opens, activate “Internet access”.

Then return to the donar phone – on the screen of which a request will appear to allow the Bluetooth tethering mode, click the “Allow” button.

If you get confused as to which phone has a Bluetooth tethering enabled and which one is using the Internet via Bluetooth, then the Bluetooth connection setting for the donor phone will say “Internet connection sharing”.

And on a phone that uses the Internet via Bluetooth, it will say “Internet access”.

Dynamic swap files are created only when needed

Swapspace is an excellent dynamic swap space manager

The disadvantage of large swap files is that they take up a lot of disk space even during those periods when programs have enough RAM and swap files are not used.

Related articles:

The Swapspace program solves this problem: swap files are created only when they are really needed, that is, when the operating system runs out of RAM. If the created Swap file runs out of space, another one is created. If it is not enough, then as many swap files are created as necessary. This prevents applications that need RAM from crashing. After the need for Swap files disappears, they are automatically deleted.

If you often need large swap files, then create a static large file without using Swapspace. Or, as a better option, increase the amount of RAM in your computer or server.

The Swapspace service can be used in conjunction with a fixed size swap file, in which case it will be taken into account when creating additional swap files.

Install Swapspace

To install swapspace on Debian, Kali Linux, Linux Mint, Ubuntu and their derivatives, run the command:

sudo apt install swapspace

To install swapspace on Arch Linux, Manjaro, BlackArch and their derivatives, install pikaur and then run the command:

pikaur -S swapspace

Setting up swapspace

The swapspace service does not need to be configured, it is easy enough to start!

Swapspace already has balanced settings for creating and deleting swap files. If desired, you can change the settings in the /etc/swapspace.conf file:

sudo gedit /etc/swapspace.conf

You can change the time after which swap files will be deleted after they are freed, you can set the maximum size of swap files created, you can change the location of swap files.

By the way, you can check the available disk space with the following command:

df -h /

Keep in mind that the swap file should only be readable by the root user, otherwise it would be a serious security hole.

As already mentioned, there is no need to configure anything, you can proceed to start the service.

Managing the swapspace service

Starting the swapspace service:

sudo systemctl start swapspace.service

Checking the status of the swapspace service:

systemctl status swapspace.service

Adding the swapspace service to autoload:

sudo systemctl enable swapspace.service

To stop and remove the swapspace service from startup, use the following commands:

sudo systemctl stop swapspace.service
sudo systemctl disable swapspace.service

Checking if swapspace works

To fill all available RAM, use the following command:

stress-ng --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 1.1;}' < /proc/meminfo)k --vm-keep -m 1

See also: How to check Swap file usage in Linux

As you can see, the swap file is being used, even though there was no swap file on the system before swapspace was started.

Check swap file usage with swapon:

swapon --show

It turns out that three swap files have been created, one of which is completely filled, the other is partially filled, and the third, apparently, has been prepared in advance:

NAME                 TYPE   SIZE   USED PRIO
/var/lib/swapspace/1 file 809,6M 808,6M   -2
/var/lib/swapspace/2 file 665,1M  90,7M   -3
/var/lib/swapspace/3 file 823,6M     0B   -4

Stop the stress test:

Some time after the end of the stress test (the specific time can be configured), the swap files are deleted automatically:

How to check Swap file usage in Linux

The swap file will be used when the physical memory runs out. In order to check the operation of the Swap file, you need to artificially use up all the RAM. You don’t need to run many applications and open dozens of tabs in your web browser to do this, instead you can use stress testing tools like stress-ng.

See also:

Install stress-ng

To install stress-ng on Debian, Kali Linux, Linux Mint, Ubuntu and their derivatives, run the command:

sudo apt install stress-ng

To install stress-ng on Arch Linux, Manjaro, BlackArch and their derivatives, install pikaur and then run the command:

pikaur -S stress-ng

How to fill 110% of the free memory

An example of a command that will consume 10% more RAM than system has free RAM:

stress-ng --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 1.1;}' < /proc/meminfo)k --vm-keep -m 1

After that, watch the memory consumption – you will see how the Swap file starts to be used.

On the command line, Swap file usage can be checked with the command:

swapon --show

How to use an Android phone to access the Internet on a computer without Wi-Fi

In the article “How to share mobile Internet with other phones and computers”, we already talked about how to use a mobile phone as an Access Point, but what if the computer does not have a Wi-Fi adapter or drivers are not installed for it?

This article is devoted to the answer to this question – it tells how to connect a computer to the mobile Internet using a USB cable.

In fact, this method is even simpler than creating a mobile hotspot.

How to Use Android Phone as USB Tethering in Windows

As you can see in the screenshot, the computer does not have an Internet connection.

Start by connecting your phone to your computer with a USB cable.

Then go to the settings of your phone, this can be done by unrolling the curtain from top to bottom and clicking the gear icon.

Further, the name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “USB tethering”.

Everything is ready – now your computer is online and can connect to the Internet. You can install Wi-Fi drivers or perform other network actions that you need.

No additional configuration is required on the computer. Now the computer is connected to the network – the USB tethering connection has a wired connection icon.

What to do if the USB modem item is not active or missing

The USB modem item may be inactive in two cases:

  1. The phone is not connected to the computer with a USB cable.
  2. USB cable does not support data transfer

Try another USB cable – the one that came with the phone should support data transfer.

Things to remember when using a mobile phone for the Internet

  1. Please note that if the phone is not connected to Wi-Fi, then mobile data will be used – if you do not have an unlimited data plan, then this will cost you money.
  2. You can connect your phone to a Wi-Fi network and still use it as a USB modem. The result is that your computer is using Wi-Fi through your phone, and not mobile data.
  3. If, when you turn on the USB modem, there is still no Internet access on the computer, then check if other network connections are disabled: for example, via Wi-Fi or by wire, the computer can be connected to a router that does not have Internet (disabled for non-payment or damaged cable).
  4. If you disconnect the phone from the USB cable, and then connect it to the computer again, you will need to turn USB tethering on again in the phone each time
  5. While the mobile phone is operating as a USB modem, you cannot send and receive files from it

How to enable file transfer between computer and phone

When the USB modem is enabled, it is not possible to exchange files between the computer and the phone.

In order to make it possible to copy files, you can disconnect the phone from the computer, and then reconnect and, when asked for permission to transfer files, provide it.

Another option is to disable the USB modem and enable data transfer (or only charging) in the phone settings without disconnecting it from the USB cable. To do this, open the curtain and expand the notification “USB tethering turned on”.

Click to configure the USB connection to the corresponding label.

Instead of “USB tethering” select “USB tethering” or “Charging phone only”.

How to share mobile Internet with other phones and computers

This guide will tell you how to turn on Wi-Fi on your phone for other devices so that they can use the Internet. This can come in handy, for example, when you want your friends to be able to connect to the Internet if they have a bad signal or use up their data limit. Another example: you can connect your laptop or computer to your phone via Wi-Fi and access the Internet through your phone, even if you are away from home or your “wired” ISP is out of service.

The specific names of menu items may vary depending on phone models – it's not a problem, the main thing is to understand the essence, then you can set up a mobile hotspot on any phone.

How mobile hotspot works

Your phone can use the Internet from:

  • mobile operator
  • WiFi hotspots

Typically, wireless routers act as Wi-Fi access points for phones and computers. And the Internet source for routers is wired Internet service providers.

But mobile phones can also act as a Wi-Fi hotspot. At the same time, the source of the Internet on them will be a mobile Internet provider or Wi-Fi connection.

What is needed for the phone to work as a Wi-Fi router

All Android phones can act as a Wi-Fi router for other devices.

But it is also necessary that the phone can use the mobile Internet. Since the computer that you connect to the Internet can automatically download updates and consume too much Internet, it is advisable to buy a mobile traffic package in advance.

How to turn on Wi-Fi for other devices on your phone

To enable mobile hotspot, make sure you have mobile data turned on.

Note: modern phones can distribute mobile Internet or they can be connected to a Wi-Fi network and distribute Internet through a wireless Access Point at the same time. This can be useful if you do not know the Wi-Fi password or want to temporarily connect other users to the Internet without giving them the Wi-Fi password on the router.

Now go to the settings, this can be done by clicking the gear or the “Settings” icon among the applications.

The menu names may vary slightly, but most likely you need to go to the “Connections” item. Perhaps already in the main menu you will see the section “Mobile Hotspot and Tethering” – go to it.

Find “Mobile Hotspot and Tethering”.

You need to enable “Mobile Hotspot”, to do this, move the lever.

Depending on your phone model, you may need to disable Wi-Fi connection to enable mobile hotspot.

What is the Wi-Fi password for mobile hotspot

To see or set a password instead of enabling Mobile Hotspot, click on it to go to the mobile hotspot settings.

Here click on “Configure” to change Mobile Hotspot settings.

Here you can change Network name

and Password.

It is recommended that you use a password to prevent strangers from connecting to your phone's Wi-Fi. Connecting outsiders is bad for many reasons:

  • excessive consumption of mobile traffic
  • security of other devices connected to the phone
  • faster battery drain
  • an outsider can use your Internet connection for crimes or illegal activities (and you will have problems)

How to check who is connected to a mobile hotspot

In the “Mobile Hotspot” menu you will see Connected devices.

Why does my battery drain so fast when using mobile hotspot

When your phone shares Wi-Fi with other devices, it does not go into sleep mode, but constantly uses the Wi-Fi module and modem for mobile Internet. Working as a router also creates a load on the processor.

There is nothing you can do about the fact that the phone runs out of power faster, but you can leave it on charge while the mobile hotspot is running.

How to keep track of your mobile data usage

You can track your internet usage in the app or website of your mobile operator, or on your phone itself.

Find “Data Usage” in the menu.

Here you can:

  • see how much data was downloaded in total (via mobile networks and Wi-Fi)
  • view data consumption in certain periods
  • check which apps are consuming the most data
  • set warnings and limits when a certain threshold is reached

See also: How to use an Android phone to access the Internet on a computer without Wi-Fi

Loading...
X