How to create a swap-file: .... steps and ideas how to do that

dear community

note: i did this some weeks before - but on another machine. Now i am facing the same issue - i have a old notebook which is damned slow - with eos:

so i remember your recommendations - to try out a swap-file.

i remember the steps to go: - some times its a apropiate method to write down some HowTo-Steps - so i did this here: plz correct me if i am wrong at any point,.

swap: as a file: how to do !? - here some musings and question: can we do so !? Can we do like so?
well the question is: can i go all these steps in Endeavour-Linux - can i create a swap-file with these steps?

during the installation of the system i just have forgotten to create a swap-partition.

but this can be done even now: to do this - we can go round to create swap in partition - we easily do it with the file-creation
here we go:

first things first here a little preliminary note. This process is allmost completly done in terminal.

that said - you will see that allmost every command lines will be listed here and

step 1 start the terminal and type in this command to create a swap file:

sudo fallocate -l 2G /swapfile

note: this tiny command will do alot: it just creates a 2 GB swapfile.
So, if you need a even taller size of the so called swap file, just replace the number above 2G in the command you like more with the number you want.

2G represents a very cool swap file size.
If you need to have 4 GB or 8 GB swap file, then we need to type in 4G or even 8G in the command

and so forth…

so the question is : can i go like mentioned above!?

look forward to hear from you.

I’d take a look here: