You'd need root access to install truffle via the terminal.
Here's how to go about it, if you're running on a Windows OS.
Step 1: Run CMD as an administrator. You should find yourself in C:\Windows\system32> The "system32 folder".
Step 2: Run the following command in the terminal and let truffle complete its installation process. Make sure you are connected to the internet and in some cases after installation you'd see some error messages & warnings you can ignore them.
C:\Windows\system32>npm install -g truffle
Step 3: Review your truffle environment || run "truffle version"
C:\Windows\system32>truffle version
Truffle v5.4.0 (core: 5.4.0)
Solidity v0.5.16 (solc-js)
Node v14.17.3
Web3.js v1.4.0
That's pretty much it on installing truffle in windows OS.
NOTE: You don't need root access before initializing a new truffle project.