There are 2 versions of Twrp:
The REC version that installs with the command:
fastboot flash recovery_ab recovery.img
fastboot reboot recovery
The Boot version that installs with the command:
fastboot boot twrp.img
In TWRP > Advanced > flash current TWRP
Img Boot version>as Rec
I specified Windows because it seems to me that you are using Linux.
Seems the commands are the same on Linux.
TWRP (Team Win Recovery Project) is an open-source custom recovery image for Android devices. It is a replacement for the stock recovery mode that is installed on most Android devices by the manufacturer. TWRP provides various advanced features and options that are not available in the stock...
www.androidguru.eu
Install Platform Tools, TWRP in this folder and run commands from this folder.
Android SDK Platform-Tools is a component for the Android SDK.
developer.android.com
For the 1st post I read too fast.