Console client for Linux
The Yandex.Disk console client for Linux lets you manage files on Yandex.Disk without using a window interface or programs that support WebDAV.
Advantages to using the console client compared to a WebDAV connection:
- Low system resource requirements.
- Faster file reading and writing speeds.
- Faster syncing with the Yandex.Disk server.
- Manage files offline.
The console client can be installed on the following operating systems:
- Ubuntu Linux 8.04 and later
- Debian 5 and later
- Fedora 9 and later
- Red Hat Enterprise Linux 6 and later
- CentOS 6 and later
Installing the client
To install the client automatically, use the command for quick package installation.
- Example of quick .deb package installation
-
echo "deb http://repo.yandex.ru/yandex-disk/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/yandex-disk.list > /dev/null && wget http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y yandex-disk
To install the client manually, download the appropriate version of the package from the corresponding link below.
| Package format | 32-bit | 64-bit |
|---|---|---|
| .deb (Ubuntu, Debian) | yandex-disk_latest_i386 | yandex-disk_latest_amd64 |
| .rpm (Fedora, Red Hat Enterprise Linux, CentOS) | yandex-disk-latest.i386 | yandex-disk-latest.x86_64 |
| Package format | 32-bit | 64-bit |
|---|---|---|
| .deb (Ubuntu, Debian) | yandex-disk_latest_i386 | yandex-disk_latest_amd64 |
| .rpm (Fedora, Red Hat Enterprise Linux, CentOS) | yandex-disk-latest.i386 | yandex-disk-latest.x86_64 |
- Example of installation using the dpkg package manager
-
# dpkg -i yandex-disk_0.1.0.103_i386.deb
- Example of installation using the rpm package manager
-
# rpm -ivh yandex-disk-0.1.0.103-1.fedora.i386.rpm
You can also add the repository containing the yandex-disk package to the list of available package manager repositories and install the package using the apt-get or yum utilities.
- Installation using apt-get
- Attention. Save a copy of the file /etc/apt/sources.list.d/yandex.list before making changes to it.
# echo "deb http://repo.yandex.ru/yandex-disk/deb/ stable main" >> /etc/apt/sources.list.d/yandex-disk.list # apt-get update # apt-get install yandex-disk
- Installation using yum
-
# nano /etc/yum.repos.d/yandex.repo # rpm --import http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG # yum install yandex-diskyandex.repo contents:
[yandex] name=Yandex failovermethod=priority baseurl=http://repo.yandex.ru/yandex-disk/rpm/stable/$basearch/ enabled=1 metadata_expire=1d gpgcheck=1 gpgkey=http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG
You may need to import an open GPG key into the system to check the package's digital signature.
- Import a GPG key for a .deb package
-
wget -O YANDEX-DISK-KEY.GPG http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG sudo apt-key add YANDEX-DISK-KEY.GPG
- Import a GPG key for a .rpm package
-
sudo rpm --import http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG
Setup wizard
You can run the client setup using the setup command.
$ yandex-disk setup - Enter the name of the directory where the local copy of Yandex.Disk is stored. If you leave the name blank, a Yandex.Disk folder will be created in the home directory.
- Indicate whether or not to use a proxy server (y/n).
- Indicate whether or not to launch the client at startup (y/n).
- Enter your Yandex username.
- Enter your Yandex password.Attention. If you use two-factor authentication or have used it before, you need a one-time password generated by the “Yandex.Key” mobile app to log in to the Yandex.Disk program.
After the Wizard has finished, the config.cfg configuration file will be created in ~/.config/yandex-disk.
Using the client
Commands
Use the following commands to work with the client:
- Token — To get an authorization key (OAuth token) for your Yandex username (USERNAME). When entering the command, you can enter your Yandex password (PASSWORD) as well as the token file and its directory (FILE). If no additional options are specified, the passwd file will be created in ~/.config/yandex-disk to store the token.
$ yandex-disk token [-p, --password=PASSWORD] [OPTION] USERNAME [FILE] - Start to launch the daemon and sync all folders except those on the exclude-dirs exclusion list.
$ yandex-disk start [OPTION] - Status to display the daemon's status (sync status, sync errors, list of synced files, and total and available space on Yandex.Disk).
$ yandex-disk status [OPTION] - Stop to stop the daemon.
$ yandex-disk stop [OPTION] - Sync to sync all folders except those on the exclude-dirs exclusion list.
$ yandex-disk sync [OPTION] - Publish to get a public link to the specified file or folder (FILE).
$ yandex-disk publish [OPTION] FILE - Unpublish to unpublish the specified file or folder (FILE).
$ yandex-disk unpublish FILE
Additional options [OPTION]
- --config=FILE, -c FILE
-
Show configuration file. The config.cfg file is used by default in ~/.config/yandex-disk.
- --dir=DIR, -d DIR
-
Enter the directory where a local copy of Yandex.Disk will be stored. If a name was not entered during the initial setup, ~/Yandex.Disk will be used by default.
- --auth=FILE, -a FILE
-
Enter the file containing authorization data. The default file is passwd, which was created using the token command or the setup wizard and is stored in ~/.config/yandex-disk.
- --exclude-dirs=DIR1,DIR2,...
-
Do not sync the specified directories. For these settings to always apply, these directories must be added to the exclude-dirs exclusion list in the config.cfg file. For settings to work correctly, the names of excluded directories should be separated with commas, not spaces.
- --read-only
-
Forbid changing files on the Yandex.Disk server and only sync local copies. In the event of syncing conflicts, local files are renamed. If the --overwrite setting is also enabled, local files are overwritten.
- --overwrite
-
Let changes made to the local copy of Yandex.Disk be overwritten when syncing with the server. Use together with the --read-only option.
- --no-daemon, -D
-
Launch the daemon without returning management to the console. To return management, the daemon must be stopped by launching the command yandex-disk stop in another console or by closing the current console.
- --help, -h
-
Display help.
- --proxy=PARAM
-
Configure a proxy server. Valid parameters:
- Auto — Use system proxy settings (used by default).
- no — Do not use a proxy server.
- protocol,address,port,login,password — Manually set up the server.
Examples of using commands
$ yandex-disk start -c ~/ydconfig/newconfig.cfg # launch the daemon and sync with specified configuration file $ yandex-disk start --exclude-dirs=Foto # do not sync folder 'Photo'$ yandex-disk sync --read-only # sync folders in 'read-only' mode$ yandex-disk publish Photo # get a public link to the folder 'Photo' Example of the 'config.cfg' file
# Path to file with authorization dataauth="/home/user/ydconfig/my_passwd"# Folder for storing the local copy of Yandex.Disk.dir="/home/user/myDisk"# Do not sync specified folders.#exclude-dirs="exclude/dir1,exclude/dir2,path/to/another/exclude/dir"# Specify proxy server. Examples:#proxy=https,127.0.0.1,80#proxy=https,127.0.0.1,80,login,password#proxy=https,127.0.0.1,443#proxy=socks4,my.proxy.local,1080,login,password#proxy=socks5,my.another.proxy.local,1081#proxy=auto#proxy=no FAQ
What Yandex.Disk features are available in the console client?
All of the main Yandex.Disk features are available when using the console client: syncing and sharing files and folders, as well as custom folder syncing.
Does custom folder syncing work in the console client?
Yes. You can choose not to sync certain folders by entering the command (setting --exclude-dirs=DIR1,DIR2,...) or by adding them to the exclude-dirs exclusion list in config.cfg.
Does the console client support symbolic links?
Yes, it does.
Can the console client be used for data replication?
Yes. Data can be replicated using the --read-only parameter.
GUI Linux console client
You can work with the console client using a third-party GUI.
| Name | Description |
|---|---|
| YD-tools | This utility supports all of the basic console client functions. An icon in the taskbar shows the current sync status and pop-up notifications can be used to keep you informed of any changes. The utility also adds publishing items to the context menu. |
| Ya-gui | This utility lets you launch daemons in normal or advanced mode (with additional options). It adds publishing items to the context menu. When running, it lets you enable and disable file access, halt the daemon, and display information about the daemon's current status. |
| Yandex.Disk ServiceMenu | Lets you quickly access Yandex.Disk: copy public links to files or folders in the clipboard and save files to your Yandex.Disk folder. |
| Name | Description |
|---|---|
| YD-tools | This utility supports all of the basic console client functions. An icon in the taskbar shows the current sync status and pop-up notifications can be used to keep you informed of any changes. The utility also adds publishing items to the context menu. |
| Ya-gui | This utility lets you launch daemons in normal or advanced mode (with additional options). It adds publishing items to the context menu. When running, it lets you enable and disable file access, halt the daemon, and display information about the daemon's current status. |
| Yandex.Disk ServiceMenu | Lets you quickly access Yandex.Disk: copy public links to files or folders in the clipboard and save files to your Yandex.Disk folder. |
If you know of any other GUIs for console clients that we didn't list, please let us know by using the form at the bottom of the page
You can also work with Yandex.Disk over WebDAV.