Once installed, you can use the CyberGhost command-line app to quickly initiate a VPN connection and have all of your traffic encrypted, as well as your IP switched to the one provided by the VPN server.
NOTE1: To quickly connect to one of the available countries (we'll use United States or this example command), just open a Terminal window and type:
sudo cyberghostvpn --traffic --country-code US --connect
Press Enter and you'll be connected to one of our United States servers.
For another country, let's say Germany, the command would be the same, just the country code changed to DE ("sudo cyberghostvpn --traffic --country-code DE --connect")
NOTE2: At any time, with Terminal open, type in "cyberghostvpn" and press Enter to see the available list of commands.
The following article will show you how to connect to any of the available countries via the CyberGhost app and how to choose a single server.
1. With CyberGhost installed (as seen here) > Open a Terminal window
NOTE: You do not need to navigate to CyberGhost's folder, you can type in the commands right away.
2. Now get a list of all our available servers (you'll need their country codes to tell the app what country to use):
- type in (without the quotes) "cyberghostvpn --traffic --country-code" > press Enter
- you'll be presented with a list of all available countries and their respective country code
3. To connect, simply choose a country and instruct the app to connect to it.
- for Germany, we'll type in "sudo cyberghostvpn --traffic --country-code DE --connect" and press ENTER
- CyberGhost will display a "VPN connection established" message once the connection is successful
4. To confirm that you're connected to the VPN you can type in "cyberghostvpn --status"
- also, you can visit a site such as https://www.iplocation.net/ (make sure that you wait a few seconds after connecting and access this site in a new browser window, Incognito Mode is advised as these sites often rely on cookies and your old location may be stored until a restart of the browser or Incognito Mode is used)
This can be useful if you're looking for a more customized experience by choosing a server from a specific city which is perhaps closer to your real location.
In this section, we will learn how to connect to a single Chicago server from the United States:
1. Open a Terminal window
2. To see all available US server locations (cities), type in (without the quotes) 'cyberghostvpn --traffic --country-code US'
3. Now that we can see all available cities, we need to fetch a list of servers available in a single city by typing in 'sudo cyberghostvpn --traffic --country-code US --city Chicago'
4. Let's say we want to connect to "chicago-s07-i09", we just need to type in this command:
sudo cyberghostvpn --traffic --country-code US --city Chicago --server chicago-s07-i09 -- connect
TIP: Once you know the server name, you don't need to fetch the server list, you can just type in 'sudo cyberghostvpn --server chicago-s07-i10 --connect' right after you open a Terminal window and it will connect you straight to that server.