![| Embarcadero RAD Studio Delphi C++Builder Blogs Can I Do Linux Development On Windows](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/2022-07-17_22-25-10-9990853.png?resize=1140%2C694&ssl=1)
Windows is the most popular desktop operating system in the world. Almost 50% of developers use it every day. At the same time, many of you are building and deploying applications to Linux-based servers running in the cloud. You need a solution for seamlessly developing Linux-based applications on Windows. It will allow you to maintain the settings across both operating systems. As a result, you can easily switch back and forth. But how can you do Linux development on Windows? Is it difficult to do? Is there atool that can help you easily do Linux development on Windows without any compromises? In this post, you will find all the details.
Table of Contents
Is it possible to do Linux development on Windows?
Yes, it’s not only possible, but also actually easy to do. You can do Linux development on Windows by using RAD Studio. RAD Studio streamlines and simplifies the development life cycle by providing a comprehensive set of tools for editing, visualizing and debugging your Linux applications. Also, RAD Studio allows you to develop applications for the target Linux platform as well as the other platforms it supports such as Windows, iOS and Android – all from a single set of source code and the same project. As a result, it has become a great choice for doing Linux development on Windows.
What is WSL and how can it help me develop and run Linux apps on Windows machines?
With the release of the Windows Subsystem for Linux or WSL you don’t even have the need for a separate machine running Linux. WSL allows a complete Linux environment to run on your Windows machine fully integrated with the rest of Windows. You can run almost any Linux app on WSL and Microsoft have released WSL2 which adds full support for graphical Linux applications to run. When they run, they act just like any regular Windows app on the machine – in fact the main screen shot for this article shows a Linux GUI application created by RAD Studio Delphi running on a Windows 11 PC using WSL.
WSL comes as part of the latest versions of Windows 10 and Windows 11.
Read: Linux GUI Applications on Windows Subsystem for Linux
Why should I use RAD Studio for Linux development on Windows?
- RAD Studio allows you to quickly develop high-performance cross-platform native apps from a single set of source code.
- RAD Studio enables development using the FireMonkey FMX framework for Windows, macOS, Android, iOS, and Linux.
- The clean. intuitive UI design of RAD Studio helps you to quickly find all the necessary tools all in a single integrated development environment.
- RAD provides a rich runtime library, an extensive set of user interface controls, and comprehensive database libraries allowing developers to produce great looking powerful modern applications with all the enterprise features and cloud connectivity users could need.
- RAD Studio offers regular updates and bug fixes to ensure the best performance and to meet the challenges of our fast-moving technological world.
How can I do Linux development on Windows using RAD Studio?
With RAD Studio installed on your Windows machine, you can create and deploy 64-bit Linux apps to a Linux machine. The deployment of the Linux apps can be to either physical computers running Linux, virtual machines with Linux on them or even Windows Subsystem for Linux WSL.
The Linux machine – either physical or virtual – needs some development packages installed on it first before it is suitable be used with RAD Studio. You only need to do this once on the Linux machine you are going to be using to partner with your Windows PC. Not all Linux distributions are the same, so the instructions vary a little depending on the exact Linux distro you are using.
You just need to follow these steps:
How can I install development packages On Ubuntu?
1. First, you have to open the Terminal on your Windows PC.
2. Next, you have to upgrade the packages you have already installed. Run the following command in the terminal:
1 |
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade |
3. Then type your user password and press Enter.
4. Now, you have to wait for a few seconds. You will be prompted to agree to the package upgrade operation. Type Y and press Enter.
5. The package upgrade operation will begin. The process will be completed within a few minutes.
6. Once it’s done, you have to add the development packages. Run this command in the terminal:
1 |
sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5 |
7. Enter your username and password. Then press Enter.
8. You will be prompted to agree to the package installation operation. Type Y and press Enter.
9. The package installation process will begin. It will take a few minutes to complete the operation.
How can I install development packages on Red Hat Linux?
1. First, you have to open the Terminal on your Windows PC.
2. Then you have to type the following command:
1 |
yum groupinstall 'Development Tools' |
3. Finally, press Enter. The package will begin to get installed on your PC. The whole process will take a few minutes.
How can I prepare my Linux machine for Linux development on Windows?
To create Linux applications, you need to add a virtual machine PAServer. Here are the steps:
1. First, you have to find the LinuxPAServer21.0.tar.gz file in the following location:
1 |
C:Program Files (x86)EmbarcaderoStudio21.0PAServerLinuxPAServer21.0.tar.gz |
2. Then you have to unpack the LinuxPAServer21.0.tar.gz file. To do that you will need to install a library called “zLib” onto the Linux machine.
How can I use the System.zLib unit on Red Hat?
1. First, you have to install the zLib-devel library into your RHEL machine. Run the following command:
1 |
sudo yum install zlib-devel |
2. Then you have to update the local SDK cache.
How can I use the System.zLib Unit on Ubuntu?
1. First, you need to install the zLib-devel library into your Ubuntu machine. Use this command:
1 |
sudo apt-get install zlib1g-dev |
How do I uncompress the tar.gz PAServer file on WSL?
At the terminal prompt type in the following command (this also works for other Linux systems):
1 |
tar -xvzf LinuxPAServer22.0.tar.gz |
![| Embarcadero RAD Studio Delphi C++Builder Blogs linux development on windows unpacking the PAServer archive at the Linux command line](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/2022-07-17_21-46-47-9905785.png?resize=597%2C153&ssl=1)
What is a connection profile and how do I create one?
A connection profile contains the settings needed to establish a communication pipeline between your Windows PC and the Linux machine. This is required even if the Linux ‘machine’ is actually a WSL instance on the same Windows PC as the one on which RAD Studio is installed.
The Linux PC runs a program called PAServer which you may be familiar with if you’ve used RAD Studio to create macOS or iOS apps.
The connection profile stores the IP address and port number of the PAServer along with some security credentials.
How to install PAServer on a Linux machine
1. First, right-click the folder where you have unpacked the LinuxPAServer21.0.tar.gz file. Click Open in Terminal.
2. Then run the following line in the terminal:
1 |
./paserver |
3. On the RAD Studio, navigate through Tools > Options > Environment Options > Connection Profile Manager page. Click the Add button.
![Click the Add button | Embarcadero RAD Studio Delphi C++Builder Blogs linux development on windows click the add button](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/Click-the-Add-button-5823175.jpg?resize=750%2C404&ssl=1)
4. The Create a Connection Profile wizard will show up. Enter your preferred profile name. In the Platform field, select the option for the 64-bit Linux platform. Once you are done, click the Next button.
![Once you are done click the Next button | Embarcadero RAD Studio Delphi C++Builder Blogs linux development on windows once you are done click the next button](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/Once-you-are-done-click-the-Next-button-6393307.jpg?resize=750%2C407&ssl=1)
5. Now, you have to add the information about the remote machine. In the Remote machine field, enter the IP address or machine name. Then click the Test Connection button to check if the values are valid. If everything is OK, click on the Finish button.
![If everything is OK click on the Finish button | Embarcadero RAD Studio Delphi C++Builder Blogs if everything is ok click on the finish button](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/If-everything-is-OK-click-on-the-Finish-button.-9191339.jpg?resize=750%2C406&ssl=1)
How can I add the installed Linux SDK to RAD Studio?
1. First, go to Tools > Options > Environment Options > SDK Manager. Click the Add button.
2. In the Select a platform field, click 64-bit Linux. In the next field, select a profile to connect from the drop-down list. Finally, click on the OK button.
![Finally click on the OK button | Embarcadero RAD Studio Delphi C++Builder Blogs finally click on the ok button](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2022/07/Finally-click-on-the-OK-button-6712651.jpg?resize=750%2C404&ssl=1)
That’s it! You are ready to do Linux development on Windows.
Should I use RAD Studio in 2022 for Linux development on Windows?
RAD Studio is a powerful IDE for developing cross-platform applications. It allows you to build apps 5 times faster than some other comparable technologies. RAD Studio comes with a great set of amazing features. It has an extremely fast highly optimized compiler. Also, it supports all the modern features you’d expect from a professional development Code Insight™ technology. By utilizing it, RAD Studio can automatically complete your based on your libraries. Besides, it is very easy to use. The user-friendly interface helps you to find all the necessary tools quickly. On top of that, RAD Studio allows you to do Linux development on Windows. Therefore, you should definitely consider using RAD Studio in 2022 and beyond.
Learn more about application development in this article about Windows Linux Subsystem.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition