There are different methods to root an Android device.
Method 1: use app
There are Android apps that allow to root your device just by installing, running it and swapping a slider.
Cross your fingers so any of these apps support your device, as it is the easiest way.
Some popular apps are Towelroot or Kingroot.
Method 2: run toolkit
Windows:
Mac:
https://www.xda-developers.com/mac-users-now-have-their-own-nexus-7-toolkit/
https://forum.xda-developers.com/showthread.php?t=1837401
http://www.androidrootz.com/2012/12/nexus-7-one-click-toolkit-for-mac.html
Files no longer downloadable (o bytes)
Method 3: install SuperSU
1.Download SuperSU
This app is no longer available in Play Store.
Download SuperSU from APKMirror
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=SuperSU
Download SuperSU 2.82.1 (latest to this post’s date) from APKMirror
https://www.apkmirror.com/apk/codingcode/supersu/supersu-2-82-1-release/supersu-2-82-1-android-apk-download/download
2. Install and run custom recovery
Read this post.
3. Copy SuperSU
Run this command from terminal
./adb push /Users/pablo/Downloads/UPDATE-SuperSU-v1.04.zip /sdcard/UPDATE-SuperSU-v1.04.zip
Volume , recovery mode
You should see ClockworkMod Recovery
Tap install zip from sdcard
Tap choose zip from sdcard
Tap 0 to access the /sdcard area
Tap UPDATE-SuperSU-v1.04.zip
Reboot your mobile device.
I got to install it, but once I started mobile SuperSU app crashes easily.