The CyberGhost VPN CLI app lets you connect to the fastest available server in a specific country or choose a server in a particular city. Before using these commands, make sure you have an active CyberGhost subscription and the CyberGhost VPN CLI app installed on your Linux system.
Connect to a Country
To connect to a country, open a Terminal window.
Then type the following command and press Enter:
sudo cyberghostvpn --traffic --country-code <country_code> --connect
Note: Replace <country_code> with the two-letter country code for your preferred location. For example, you’d write US to connect to the US or DE to connect to Germany.
If prompted, enter your Linux account password and press Enter.
When the connection is established successfully, the CLI will display a confirmation message.
View Available Countries
To display a list of supported countries and their country codes, open Terminal and run the following command:
sudo cyberghostvpn --traffic --country-code
Alternatively, you can use this table to find your preferred country server.
| No. | Country | Country code |
| 1 | Andorra | AD |
| 2 | United Arab Emirates | AE |
| 3 | Albania | AL |
| 4 | Armenia | AM |
| 5 | Argentina | AR |
| 6 | Austria | AT |
| 7 | Australia | AU |
| 8 | Bosnia & Herzegovina | BA |
| 9 | Bangladesh | BD |
| 10 | Belgium | BE |
| 11 | Bulgaria | BG |
| 12 | Bolivia | BO |
| 13 | Brazil | BR |
| 14 | Bahamas | BS |
| 15 | Belarus | BY |
| 16 | Canada | CA |
| 17 | Switzerland | CH |
| 18 | Chile | CL |
| 19 | China | CN |
| 20 | Colombia | CO |
| 21 | Costa Rica | CR |
| 22 | Cyprus | CY |
| 23 | Czechia | CZ |
| 24 | Germany | DE |
| 25 | Denmark | DK |
| 26 | Dominican Republic | DO |
| 27 | Algeria | DZ |
| 28 | Ecuador | EC |
| 29 | Estonia | EE |
| 30 | Egypt | EG |
| 31 | Spain | ES |
| 32 | Finland | FI |
| 33 | France | FR |
| 34 | United Kingdom | GB |
| 35 | Georgia | GE |
| 36 | Greenland | GL |
| 37 | Greece | GR |
| 38 | Guatemala | GT |
| 39 | Hong Kong | HK |
| 40 | Croatia | HR |
| 41 | Hungary | HU |
| 42 | Indonesia | ID |
| 43 | Ireland | IE |
| 44 | Israel | IL |
| 45 | Isle of Man | IM |
| 46 | India | IN |
| 47 | Iran | IR |
| 48 | Iceland | IS |
| 49 | Italy | IT |
| 50 | Japan | JP |
| 51 | Kenya | KE |
| 52 | Cambodia | KH |
| 53 | South Korea | KR |
| 54 | Kazakhstan | KZ |
| 55 | Laos | LA |
| 56 | Liechtenstein | LI |
| 57 | Sri Lanka | LK |
| 58 | Lithuania | LT |
| 59 | Luxembourg | LU |
| 60 | Latvia | LV |
| 61 | Morocco | MA |
| 62 | Monaco | MC |
| 63 | Moldova | MD |
| 64 | Montenegro | ME |
| 65 | North Macedonia | MK |
| 66 | Myanmar (Burma) | MM |
| 67 | Mongolia | MN |
| 68 | Macau SAR China | MO |
| 69 | Malta | MT |
| 70 | Mexico | MX |
| 71 | Malaysia | MY |
| 72 | Nigeria | NG |
| 73 | Netherlands | NL |
| 74 | Norway | NO |
| 75 | Nepal | NP |
| 76 | New Zealand | NZ |
| 77 | Panama | PA |
| 78 | Peru | PE |
| 79 | Philippines | PH |
| 80 | Pakistan | PK |
| 81 | Poland | PL |
| 82 | Portugal | PT |
| 83 | Qatar | QA |
| 84 | Romania | RO |
| 85 | Serbia | RS |
| 86 | Russia | RU |
| 87 | Saudi Arabia | SA |
| 88 | Sweden | SE |
| 89 | Singapore | SG |
| 90 | Slovenia | SI |
| 91 | Slovakia | SK |
| 92 | Thailand | TH |
| 93 | Turkey | TR |
| 94 | Taiwan | TW |
| 95 | Ukraine | UA |
| 96 | United States | US |
| 97 | Uruguay | UY |
| 98 | Venezuela | VE |
| 99 | Vietnam | VN |
| 100 | South Africa | ZA |
Connect to a Specific City
If you'd like to connect to a server in a specific city, open the Terminal and type the following command:
sudo cyberghostvpn --traffic --country-code “Country” --city "Cityname" --connect.Note: Replace “Country” and "Cityname" with your preferred country code and city. For example, you’d write US followed by Dallas to connect to Dallas.
You’ll get a CLI message confirming that the connection was successful.
Alternatively, you can verify your VPN connection using our privacy tools. If you've just connected, wait a few seconds before checking, and consider using a private browsing window to avoid your browser caching location information.
Need assistance? Contact our Customer Support team:
- by email: support@cyberghost.ro
- by online request: https://support.cyberghostvpn.com/hc/en-us/requests/new
- by 24/7 live chat on our website
Comments
0 comments
Article is closed for comments.