Kaspersky Standard | Plus | Premium

Managing the application from the command line

You can manage the Kaspersky application from the command line.

In this Help section

Managing the unpacker from the command line

Managing the application from the command line

Examples of scan commands

Requirements for the proxy server configuration file

Page top
[Topic 270485]

Managing the unpacker from the command line

The unpacker of the Kaspersky application supports the following commands.

Command line options

Command

Description

--help

Display unpacker command help. This does not start the application.

./kaspl.run --help

--check

Check the integrity of the kaspl.run application file. The unpacker checks if the file is damaged or modified.

./kaspl.run --check

--allowuser

Allow the application to be run by an ordinary user.

./kaspl.run --allowuser

--target <directory_path>

Specify a directory for unpacking temporary files. The directory must not exist. If you specified the directory for unpacking temporary files manually, the application does not delete the directory after the application is closed. You must delete the temporary directory manually.

./kaspl.run --target /tmp/folder/

By default, the application places its files in the /tmp/<random_character_sequence> directory.

--noexec

Do not run the application after unpacking.

./kaspl.run --noexec

--noprogress

Hide the unpacking indicator (quiet unpacking mode).

./kaspl.run --noprogress

Page top

[Topic 270483]

Managing the application from the command line

The Kaspersky application supports the following management commands.

Command line options

Command

Description

-h

Display command line syntax help.

./kaspl.run -- -h

-trace

Enable trace collection.

./kaspl.run -- -trace

-tracelevel <level>

Set trace level.

  • ERR — only events with errors.
  • WRN — events with warnings and errors.
  • INF — information events, warning events, and error events (default).
  • DBG — all events.

./kaspl.run -- -trace -tracelevel ERR

-d <directory_path>

Specify the directory for saving application files (reports, traces, quarantine, etc).

./kaspl.run -- -d "/tmp/Kaspersky 24.0"

By default, the application saves files in the following directory:

  • /var/opt/kaspersky/Kaspersky 24.0 if the application was run by the superuser (root).
  • /home/<user_name>/kaspersky/Kaspersky 24.0 if the application was run by an ordinary user.

-accepteula

Automatically accept the End User License Agreement, the Privacy Policy, and the KSN Statement.

./kaspl.run -- -accepteula

-dontencrypt

Disable the encryption of traces, dumps, and reports.

./kaspl.run -- -dontencrypt

-allvolumes

Add all mount points except service and network mount points to the scan scope. By default, the application scans system memory, startup objects, and boot sectors of the computer.

./kaspl.run -- -allvolumes

-customonly

Run a scan of only the defined scope (custom folder scan). With this option, the application excludes the system memory, startup objects, and boot sectors of the computer from scanning. To run a custom folder scan, define a scan scope using the -custom, -customlist commands.

./kaspl.run -- -customonly -customlist /tmp/folder/scan_scope.txt

-custom <directory_path>

Add a directory to the scan scope. You can add multiple directories. The application supports full paths. By default, the application scans system memory, startup objects, and boot sectors of the computer.

./kaspl.run -- -custom /tmp/folder/ -custom /home/

-customlist <file_path>

Add multiple directories, listed in a text file, to the scan scope. Do not enclose paths in the file in quotation marks. Each path must start on a new line. The encoding of the file must be ANSI or UTF8 with BOM. By default, the application scans system memory, startup objects, and boot sectors of the computer.

./kaspl.run -- -customlist /tmp/folder/scan_scope.txt

-exclude <directory_or_file_path>

Exclude a directory or file from the scan scope. You can exclude multiple objects. The application supports full paths. By default, the application scans system memory, startup objects, and boot sectors of the computer.

./kaspl.run -- -exclude /mnt/ -exclude /home/

-excludelist <file_path>

Exclude multiple directories or files, listed in a text file, from scanning. Do not enclose paths in the file in quotation marks. Each path must start on a new line. The encoding of the file must be ANSI or UTF8 with BOM. By default, the application scans system memory, startup objects, and boot sectors of the computer.

./kaspl.run -- -excludelist /tmp/folder/exclusions.txt

-details

Enable the generation of detailed reports. The detailed report reflects all application events. By default, the application generates standard reports. A standard report includes warning and error events.

./kaspl.run -- -details

-proxyconfig <file_path>

Connect to a proxy server with a configuration file. The application only supports absolute paths.

./kaspl.run -- -proxyconfig /tmp/folder/proxy.dat

Page top

[Topic 269475]

Examples of scan commands

1 Standard scan (system memory, startup objects, and boot sectors of the computer).

./kaspl.run

2 Scan the /home directory

./kaspl.run -- -customonly -custom /home

3 Scanning a list of directories from the scan_scope.txt file

./kaspl.run -- -customonly -customlist /tmp/folder/scan_scope.txt

4 Standard scan excluding the /media directory

./kaspl.run -- -exclude /media

Page top
[Topic 270486]

Requirements for the proxy server configuration file

The Kaspersky application can automatically determine proxy server connection settings. If the application cannot connect to the proxy server automatically, you can specify connection settings using a configuration file. To do so, you must run the application on the command line with the -proxyconfig <file_path> option.

Configuration file requirements:

  • File name — proxy.dat
  • Encoding — UTF8 without BOM

    Syntax:

    server=<proxy_server_address>

    #For example, server=myproxy.com

     

    port=<port>

    #For example, port=1122

     

    username=<user_name>

    #For example, username=Fred

     

    password=<password>

    #For example, password=1234

Page top

[Topic 271028]