I installed Arduino IDE version 2.1 on Ubuntu via apt-get. Then I typed the following command in terminal to see if the Arduino IDE compiles my sketch.
arduino --verify xx.ino
However, this command launches the GUI IDE. Is the CLI not supported anymore, or is the cause in apt-get the package?