How to change brightness of display on Linux terminal

To change brightness of display on Linux terminal,
1. find the display name as follows. That is "DP-2" in my case.
$ xrandr --verbose
2. Execute the following command.
xrandr --output (the display name) --brightness (the number between 0 and 1)
For example,
xrandr --output DP-2 --brightness 0.5
If the last number is close to 0 [1], then the display will be dark [bright].