Running qgis --help
(or full/path/to/qgis --help
if the QGIS bin directory isn't in your path) in a terminal/command prompt will give you the available command line parameters. Note from the below that the --project projectfile
is an accepted parameter.
These command line parameters are in the documentation under section 9. QGIS Configuration (9.6.1. Command line and environment variables)
I just tested using QGIS 3.26.2 (on Linux) and it worked fine and loaded the specified project. If it does not work for you, please edit your question to provide more detail, such as exactly how you are trying to run the qgis --project projectfile
command and what does happen when you run it.
qgis --help
QGIS is a user friendly Open Source Geographic Information System.
Usage: qgis [OPTION] [FILE]
OPTION:
[-v, --version] display version information and exit
[-s, --snapshot filename] emit snapshot of loaded datasets to given file
[-w, --width width] width of snapshot to emit
[-h, --height height] height of snapshot to emit
[-l, --lang language] use language for interface text (changes existing override)
[-p, --project projectfile] load the given QGIS project
[-e, --extent xmin,ymin,xmax,ymax] set initial map extent
[-n, --nologo] hide splash screen
[-V, --noversioncheck] don't check for new version of QGIS at startup
[-P, --noplugins] don't restore plugins on startup
[-B, --skipbadlayers] don't prompt for missing layers
[-C, --nocustomization] don't apply GUI customization
[-z, --customizationfile path] use the given ini file as GUI customization
[-g, --globalsettingsfile path] use the given ini file as Global Settings (defaults)
[-a, --authdbdirectory path] use the given directory for authentication database
[-f, --code path] run the given python file on load
[-d, --defaultui] start by resetting user ui settings to default
[--hide-browser] hide the browser widget
[--dxf-export filename.dxf] emit dxf output of loaded datasets to given file
[--dxf-extent xmin,ymin,xmax,ymax] set extent to export to dxf
[--dxf-symbology-mode none|symbollayer|feature] symbology mode for dxf output
[--dxf-scale-denom scale] scale for dxf output
[--dxf-encoding encoding] encoding to use for dxf output
[--dxf-map-theme maptheme] map theme to use for dxf output
[--take-screenshots output_path] take screen shots for the user documentation
[--screenshots-categories categories] specify the categories of screenshot to be used (see QgsAppScreenShots::Categories).
[--profile name] load a named profile from the users profiles folder.
[-S, --profiles-path path] path to store user profile folders. Will create profiles inside a {path}\profiles folder
[--version-migration] force the settings migration from older version if found
[--openclprogramfolder] path to the folder containing the sources for OpenCL programs.
[--help] this text
[--] treat all following arguments as FILEs
FILE:
Files specified on the command line can include rasters, vectors,
QGIS layer definition files (.qlr) and QGIS project files (.qgs and .qgz):
1. Rasters - supported formats include GeoTiff, DEM
and others supported by GDAL
2. Vectors - supported formats include ESRI Shapefiles
and others supported by OGR and PostgreSQL layers using
the PostGIS extension