On the Windows command-line, I can extract archives like this:
7za e somefile.zip
I know 7-Zip supports .rar in the GUI, but can it be done in commandline mode?
Yes, you can extract .rar archives from the command line, but only if you use 7z, not 7za:
The above applies to both Linux and Windows and the syntax is identical:
You can see all command lines in the "7-zip.chm" help file (from the installation):
Extracting rar is like extracting all files: