linux get screen resolution from terminal code example Example: how to know screen resolution linux $ xrandr | fgrep '*'