Linux for Windows systems administrators
Download photoscape x for mac. Run Linux apps from both the command line and the desktop
- No, MacOS uses the Mach-0 executable file format but linux and FreeBSD use ELF. Basically you need an emulator to convert the system calls from one OS to the other. Someone is developing an emulator called darling as posted but it isn't ready for prime time While it appears that CLI programs run but GUIs are not there yet.
- Linux has come a long way, but you may still need to run Windows applications occasionally – especially Windows-only PC games. Luckily, there are quite a few ways to run Windows applications on Linux. Of course, before you try to run an old Windows program, you should look or alternatives that run natively on Linux.
- Thousands of Windows games and programs to run on your favorite Linux distro (Ubuntu, Mint, Fedora, Debian, RHEL and oh so many more). Oh the conundrum. CrossOver Linux doesn't have ye 'ole overhead of a Windows operating system or virtual machine, which means ye 'ole Windows apps will run at native speed, play games at full fps all while.
We aim to fully integrate apps running under Darling into the Linux desktop experience by making them look, feel and behave just like native Linux apps. That sounds a lot like Wine. Wine lets you run Windows software on Linux, and Darling does the same for macOS software. Another similar project is Anbox, for Android apps. Wine (originally an acronym for 'Wine Is Not an Emulator') is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly.
Content series:
This content is part # of # in the series: Linux for Windows systems administrators
https://www.ibm.com/developerworks/library/?series_title_by=linux+for+windows+systems+administrators
This content is part of the series:Linux for Windows systems administrators
Stay tuned for additional content in this series.
Prerequisites
To get the most from this article, you should have experience working with desktop applications in a Windows environment. I assume readers have a basic understanding of how to use the Linux desktop. It's beneficial to have a working Linux computer to explore the concepts and examples in this article.
Overview
Sometimes running an application on Linux for the first time requires a little extra work. Some applications such as server services might not be installed as services, so you need to start those applications from the command line. For the user accounts that start the applications, set the execute permission flag (
x
)on the application files.Running user-space applications
Linux runs processes in kernel space or user space. User space is the area of the operating system where applications typically run. Simply put, each user account has its own user space, and applications work within that realm.
Only the root user has access to kernel space by default. The root user is the superuser in Linux, comparable to the administrator account in Windows. Running an application under the root user account can pose a security risk and is not advisable.
![Run Macos Apps On Linux Run Macos Apps On Linux](/uploads/1/3/3/8/133890102/307174734.png)
Many server services need root permission to start the service. However, after the service is started, the root typically hands it off to a service account. Service accounts in Linux are technically standard user accounts. The primary difference is that service accounts are used only for running a service and aren't intended for anyone to actually log in with them.
Setting the permissions
You can set the execute permissions on a file with the
chmod
command. The umask
setting in Linux typically prevents a downloaded file from being executable, for good reason too because it can help maintain the security of your Linux computer.Most Linux distributions have a
umask
setting of 022
, which means by default a new file has permission settings of 644
. The numeric representation of permissions take the form of read (4), write (2), and execute (1). So an application download with the default permission of 644
means the file owner has read and write permission, while the group owner and other have read-only permission.For example, to give everyone execute permission on a file, use the
chmod a+x
command. The a
represents all, the plus sign (+
) represents add, and x
means execute. Likewise, if the application is a server service, you should ensure only authorized accounts have access to execute the service.If an application is capable of running under standard user account permissions but only those in a particular group need access to use it, you can set the group owner permission to executable and add the users to a group.
Getting even more specific, you can also set access control list (ACL) permissions on an executable file to allow a particular user or group the permission to run the application. Use the
setfacl
utility to set ACL permissions.For those applications, such as server services, that need to start the process as root user, you have a few options. Table 1 summarizes various options that allow users to execute server services that require root privileges.
Table 1. Options to run applications that require root privileges
Option | Description |
---|---|
As root user | Not recommended for server services. Acceptable for applications when users already know the root password and the compromise of the application is not a primary concern. |
SetUID | Not recommended due to security issues. SetUID allows a standard user to execute a file as another user, such as root. |
sudo | Commonly used and considered a good practice. sudo grants a user or member of a group permission to execute a file that would otherwise require root privileges. The user does not need to know the root password. |
Standard user account with file permissions | Set execute permission on a file for the user owner, group owner, or other (everyone). This is a common way to grant users who do not require root privileges permission to execute an application. |
Standard user account with ACL permissions | Less commonly used, but a viable solution when you don't want to grant a user sudo access or change the permissions of a file. Using the setfacl command on a file, you can grant a particular user or group of users the right to execute the file. |
Running from the command line
Running an application from the command line is an essential task when managing Linux servers. A lot of applications have shell scripts—similar to Windows batch files (.bat)—that start the applications and perform other tasks such as setting variables and assigning processes to other users. For example, an application may need a Java™ Virtual Machine (JVM) to execute. In that case, shell scripts can set the appropriate environment variables and then execute the Java command to run the Java Archive (JAR) or class file. This holds true for applications using Perl, Python, and even C#. (Yes, C# compiled applications can run on Linux!)
You can execute a command from the command line or shell prompt with just the file name if the command is a part of the shell’s built in commands, or if the command’s directory location is included in the PATH variable. Commands such as 'ls' and 'cd' are examples of commands that are generally included in the PATH by default as they typically reside in the /usr/local/bin or /usr/bin directories. But if the file location is not set in the PATH, you must include the pathname to the file. For example, if the executable myapp resides in the /usr/share/scripts directory, type
/usr/share/scripts/myapp
to execute the script. You can also use the relative path by adding the dot (.) and slash (/) before the file name and type ./myapp
. The dot (.) in the shell specifies the 'current directory.' (Windows includes the working directory on the execution path and some system administrators have been known to include the dot (.) in the PATH to emulate this, but this is not advisable for security reasons.) Likewise, you can precede the file name with the language environment such as: - sh
- php
- python
- perl
- java
More often though, packaged applications have shell scripts that set the environment variables and provide the runtime executable path of the language with the
#!
symbol, such as #!/usr/bin/python
. You should become familiar with this approach as well.Listing 1 uses the
catalina.sh
default script to start the Apache Tomcat application server using the ./
approach. Then it starts the server using the sh
approach. Since the default port is 8080, no special modifications are required to start the service as a standard user.Listing 1. Executing an application from the command line
Consider starting a typical Hypertext Transfer Protocol (HTTP) web server. In Linux, any port less than port 1024 is considered a privileged port, and only root can open privileged ports. Because web servers by default run on port 80, root needs to start the process. As noted, however, it is considered insecure to run a service as the root user. The correct procedure is to start the service as root and then hand it off to a standard user or service account.
Fortunately, a lot of server services have the scripts in place to do just that. If you build the Apache web server from source, you find it starts as root and then hands off the httpd threads to the
apache
user.Listing 2 starts a default compilation of the Apache 2 web server. The install process does a few things, including making the
apachectl
command executable. Because this process requires use of port 80, it starts with root user privileges. However, the ps
command reveals the httpd processes are running under the apache user account.Listing 2. Starting the Apache web server
Running applications in the background
Some installed software might not be as user friendly as the Apache web server. Unless you are troubleshooting or otherwise want to see exactly what is going on with an application, you probably want to run it in the background after the process starts. If you don't, the application terminates when the shell is closed. When running server services, it's not desired behavior for the service to stop every time you close the terminal shell or otherwise log out!
If you run an application in the background, it continues to work even if you close the shell window. You can start an application in the background by appending an ampersand (
&
) at the end of the execute command. For example, you can open a file with the vi editor and run it in the background with the vi /etc/sysconfig/network &
command because &
opens the /etc/sysconfig/network file and keeps it in the background. You can use the nohup
utility to allow the process to continue even after you logout. For example, nohup vi /etc/sysconfig/network &
.Listing 3 opens a file for editing in the Vim editor and places it in the background.
Listing 3. Running an application in the background
You can type the
jobs
command to see all the applications you have running in the background. Each job running in the background is assigned a sequential number, starting at 1. The job in Listing 3 is job number 1. 24940 is the process ID (PID). You can bring an application to the foreground with the fg
command and the specific job number. In this example, the process is not in use by the user, so it displays as Stopped
. However, the command fg 1
opens the terminal back to the active process of editing the file.Running applications from the desktop
Running graphical user interface (GUI) applications from the desktop in Linux isn't much different from doing so in Windows. Mostly, you need to understand how applications are grouped in menus in your particular desktop environment. Linux has an abundance of desktop applications available for various tasks. Some are native to Linux, while others might be cross-platform applications developed with C# using a common runtime environment, just like .NET Framework applications. You might find that you can even run your favorite Windows application on Linux using a virtual environment such as Wine.
Native Linux applications
It's quite possible you'll find an alternative Linux application for your favorite Windows-based application. Running native Linux applications on the desktop is straightforward. Similar to Windows, you typically find these applications organized in menus, and you simply click and run as you would a Windows application.
Can you uninstall reminders app on mac. For those applications that require root privileges, you are prompted to enter the root password before proceeding. This is similar in concept to the Run as Administrator option in Windows. Otherwise, all applications you run are in the user space of the account you are logged in to.
In Windows, you can create desktop shortcuts. Linux has similar shortcuts called launchers that you can place on the panel or desktop. When you click the launcher, it executes the program.
Citrix receiver cannot start app mac. Figure 1 displays two launchers for the Mozilla Firefox web browser on the GNOME Desktop. One launcher is located on the panel, and the other is on the desktop.
Figure 1. Viewing launchers on the desktop and panel
Mono
Many Windows applications are developed using the .NET Framework. Mono is an open source implementation of .NET that runs on many platforms, including Linux. In fact, the Mono website describes it as an implementation of C# and the Common Language Runtime (CLR) that is binary compatible with .NET. The project is currently supported by Xamarin.
On Linux, you execute applications developed with the .NET framework (or Mono) the same as you do on Windows. However, remember the Linux
umask
and default file permissions. You still need to provide execute permissions to the file so Linux will allow the executable to perform.Some cross-platform applications developed in Mono that you can install on your Linux GNOME desktop, such as F-Spot, reside on the menu with the native GNOME applications. F-Spot is an open source application for managing photos. Even though it is a C# application, it appears as a native application on the GNOME desktop. After you create a launcher for an application, you can click and run just like in Windows.
Figure 2 demonstrates the location of the Mono-based application, F-Spot, and how you can create desktop or panel launchers for it.
Figure 2. Creating a launcher for F-Spot
Wine
Wine lets you run Windows software on Linux and other operating systems. With Wine, you can install and run those applications just like you do in Windows. Wine is still under active development, and not all Windows programs work with Wine. If your application is compiled for a Windows operating system and you find it can run adequately using Wine, chances are it is a desktop application as opposed to a server application. Be sure to check the Wine documentation about the possibility of running the application on Linux because Wine doesn't fully support all applications.
When you use Wine with Linux, you have a hidden folder in your account home directory that emulates a Windows environment, as in Listing 4.
Listing 4. Wine's hidden folder that emulates a Windows environment
After you install an application using Wine, you can typically find it on the desktop menu and run it the same way you would in Windows.
For example, Camstudio is an open source tool for recording and managing screen videos. Currently, there isn't a release for the Linux operating system. However, using Wine, I installed the Windows version on a Linux desktop. Wine-related applications are typically grouped under Applications > Wine > Programs, as in Figure 3.
Figure 3. Running a Windows application on Linux using Wine
Conclusion
While managing a Linux server, you are sure to encounter software that executes from the desktop and the command line. When you understand how to set the appropriate permissions and user accounts, you can securely run those applications. With long-running processes such as server services, you can execute from the command line and appropriately set in the background. If you have applications that are geared for running from the desktop, you can do that too—sometimes even Windows applications!
Downloadable resources
Related topics
- Read Windows-to-Linux roadmap: Part 9. Installing software (Chris Walden, developerWorks, November 2003) to earn more about installing software on Linux.
- Learn more about DOS versus Linux commands.
- Learn more about running Windows applications on Linux with Wine from the project website.
- Discover how to execute .NET framework applications on Linux with Mono from the project website.
- In the developerWorks Linux zone, find hundreds of how-to articles and tutorials, as well as downloads, discussion forums, and a wealth of other resources for Linux developers and administrators.
- Follow developerWorks on Twitter.
In this article, you'll learn how to install .NET on Windows. .NET is made up of the runtime and the SDK. The runtime is used to run a .NET app and may or may not be included with the app. The SDK is used to create .NET apps and libraries. The .NET runtime is always installed with the SDK.
The latest version of .NET is 5.0.
Supported releases
The following table is a list of currently supported .NET releases and the versions of Windows they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Windows reaches end-of-life.
Windows 10 versions end-of-service dates are segmented by edition. Only Home, Pro, Pro Education, and Pro for Workstations editions are considered in the following table. Check the Windows lifecycle fact sheet for specific details.
- A ✔️ indicates that the version of Windows or .NET Core is still supported.
- A ❌ indicates that the version of Windows or .NET Core isn't supported on that Windows release.
- When both a version of Windows and a version of .NET Core have ✔️, that OS and .NET combination is supported.
Operating System | .NET Core 2.1 | .NET Core 3.1 | .NET 5 |
---|---|---|---|
✔️ Windows 10, Version 2004 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
✔️ Windows 10, Version 1909 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
✔️ Windows 10, Version 1903 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
✔️ Windows 10, Version 1809 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
❌ Windows 10, Version 1803 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
❌ Windows 10, Version 1709 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
❌ Windows 10, Version 1703 | ❌ 2.1 | ❌ 3.1 | ❌ 5.0 |
❌ Windows 10, Version 1607 | ✔️ 2.1 | ✔️ 3.1 | ✔️ 5.0 |
❌ Windows 10, Version 1511 | ❌ 2.1 | ❌ 3.1 | ❌ 5.0 |
❌ Windows 10, Version 1507 | ❌ 2.1 | ❌ 3.1 | ❌ 5.0 |
Unsupported releases
The following versions of .NET are ❌ no longer supported. The downloads for these still remain published:
- 3.0
- 2.2
- 2.0
Runtime information
The runtime is used to run apps created with .NET. When an app author publishes an app, they can include the runtime with their app. If they don't include the runtime, it's up to the user to install the runtime.
There are three different runtimes you can install on Windows:
ASP.NET Core runtime
Runs ASP.NET Core apps. Includes the .NET runtime.
Runs ASP.NET Core apps. Includes the .NET runtime.
Desktop runtime
Runs .NET WPF and Windows Forms desktop apps for Windows. Includes the .NET runtime.
Runs .NET WPF and Windows Forms desktop apps for Windows. Includes the .NET runtime.
.NET runtime
This runtime is the simplest runtime and doesn't include any other runtime. It's highly recommended that you install both ASP.NET Core runtime and Desktop runtime for the best compatibility with .NET apps.
This runtime is the simplest runtime and doesn't include any other runtime. It's highly recommended that you install both ASP.NET Core runtime and Desktop runtime for the best compatibility with .NET apps.
SDK information
The SDK is used to build and publish .NET apps and libraries. Installing the SDK includes all three runtimes: ASP.NET Core, Desktop, and .NET. Usb boot tool for mac.
Dependencies
The following Windows versions are supported with .NET 5.0:
OS | Version | Architectures |
---|---|---|
Windows 10 Client | Version 1607+ | x64, x86, ARM64 |
Windows Client | 7 SP1+, 8.1 | x64, x86 |
Windows Server | 2012 R2+ | x64, x86 |
Windows Server Core | 2012 R2+ | x64, x86 |
Nano Server | Version 1809+ | x64 |
For more information about .NET 5.0 supported operating systems, distributions, and lifecycle policy, see .NET 5.0 Supported OS Versions.
The following Windows versions are supported with .NET Core 3.1:
Note
A
+
symbol represents the minimum version.OS | Version | Architectures |
---|---|---|
Windows Client | 7 SP1+, 8.1 | x64, x86 |
Windows 10 Client | Version 1609+ | x64, x86 |
Windows Server | 2012 R2+ | x64, x86 |
Nano Server | Version 1803+ | x64, ARM32 |
For more information about .NET Core 3.1 supported operating systems, distributions, and lifecycle policy, see .NET Core 3.1 Supported OS Versions.
.NET Core 3.0 is currently out of support. https://againpowerful.weebly.com/l565-print-software-for-mac.html. For more information, see the .NET Core Support Policy.
The following Windows versions are supported with .NET Core 3.0:
OS | Version | Architectures |
---|---|---|
Windows Client | 7 SP1+, 8.1 | x64, x86 |
Windows 10 Client | Version 1607+ | x64, x86 |
Windows Server | 2012 R2+ | x64, x86 |
Nano Server | Version 1803+ | x64, ARM32 |
For more information about .NET Core 3.0 supported operating systems, distributions, and lifecycle policy, see .NET Core 3.0 Supported OS Versions.
.NET Core 2.2 is currently out of support. For more information, see the .NET Core Support Policy.
The following Windows versions are supported with .NET Core 2.2:
Note
A
+
symbol represents the minimum version.OS | Version | Architectures |
---|---|---|
Windows Client | 7 SP1+, 8.1 | x64, x86 |
Windows 10 Client | Version 1607+ | x64, x86 |
Windows Server | 2008 R2 SP1+ | x64, x86 |
Nano Server | Version 1803+ | x64, ARM32 |
For more information about .NET Core 2.2 supported operating systems, distributions, and lifecycle policy, see .NET Core 2.2 Supported OS Versions.
The following Windows versions are supported with .NET Core 2.1:
OS | Version | Architectures |
---|---|---|
Windows Client | 7 SP1+, 8.1 | x64, x86 |
Windows 10 Client | Version 1607+ | x64, x86 |
Windows Server | 2008 R2 SP1+ | x64, x86 |
Nano Server | Version 1803+ | x64, |
For more information about .NET Core 2.1 supported operating systems, distributions, and lifecycle policy, see .NET Core 2.1 Supported OS Versions.
Windows 7 / Vista / 8.1 / Server 2008 R2 / Server 2012 R2
Additional dependencies are required if you're installing the .NET SDK or runtime on the following Windows versions:
- ❌ Windows 7 SP1
- ❌ Windows Vista SP 2
- ✔️ Windows 8.1
- ✔️ Windows Server 2008 R2
- ✔️ Windows Server 2012 R2
Install the following:
- Microsoft Visual C++ 2015 Redistributable Update 3.
The previous requirements are also required if you come across one of the following errors:
The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
- or -
The program can't start because api-ms-win-cor-timezone-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
- or -
The library hostfxr.dll was found, but loading it from C:<path_to_app>hostfxr.dll failed.
Install with PowerShell automation
The dotnet-install scripts are used for CI automation and non-admin installs of the runtime. You can download the script from the dotnet-install script reference page.
The script defaults to installing the latest long term support (LTS) version, which is .NET 3.1. You can choose a specific release by specifying the
Channel
switch. Include the Runtime
switch to install a runtime. Otherwise, the script installs the SDK. How to mute messages app on mac.Install the SDK by omitting the
-Runtime
switch. The -Channel
switch is set in this example to Current
, which installs the latest supported version.Install with Visual Studio
Waves 10 full bundle crack and vst. If you're using Visual Studio to develop .NET apps, the following table describes the minimum required version of Visual Studio based on the target .NET SDK version.
.NET SDK version | Visual Studio version |
---|---|
5.0 | Visual Studio 2019 version 16.8 or higher. |
3.1 | Visual Studio 2019 version 16.4 or higher. |
3.0 | Visual Studio 2019 version 16.3 or higher. |
2.2 | Visual Studio 2017 version 15.9 or higher. |
2.1 | Visual Studio 2017 version 15.7 or higher. |
If you already have Visual Studio installed, you can check your version with the following steps.
- Open Visual Studio.
- Select Help > About Microsoft Visual Studio.
- Read the version number from the About dialog.
Visual Studio can install the latest .NET SDK and runtime.
Select a workload
When installing or modifying Visual Studio, select one or more of the following workloads, depending on the kind of application you're building:
- The .NET Core cross-platform development workload in the Other Toolsets section.
- The ASP.NET and web development workload in the Web & Cloud section.
- The Azure development workload in the Web & Cloud section.
- The .NET desktop development workload in the Desktop & Mobile section.
Install alongside Visual Studio Code
Visual Studio Code is a powerful and lightweight source code editor that runs on your desktop. Visual Studio Code is available for Windows, macOS, and Linux.
While Visual Studio Code doesn't come with an automated .NET Core installer like Visual Studio does, adding .NET Core support is simple.
- Download and install Visual Studio Code.
- Download and install the .NET Core SDK.
- Install the C# extension from the Visual Studio Code marketplace.
Download and manually install
As an alternative to the Windows installers for .NET, you can download and manually install the SDK or runtime. Manual install is usually performed as part of continuous integration testing. For a developer or user, it's generally better to use an installer.
Both .NET SDK and .NET Runtime can be manually installed after they've been downloaded. If you install .NET SDK, you don't need to install the corresponding runtime. First, download a binary release for either the SDK or the runtime from one of the following sites:
- ✔️ .NET 5.0 downloads
- ✔️ .NET Core 3.1 downloads
- ✔️ .NET Core 2.1 downloads
Create a directory to extract .NET to, for example
%USERPROFILE%dotnet
. Then, extract the downloaded zip file into that directory.By default, .NET CLI commands and apps won't use .NET installed in this way and you must explicitly choose to use it. To do so, change the environment variables with which an application is started:
This approach lets you install multiple versions into separate locations, then explicitly choose which install location an application should use by running the application with environment variables pointing at that location.
When
DOTNET_MULTILEVEL_LOOKUP
is set to 0
, .NET ignores any globally installed .NET version. Remove that environment setting to let .NET consider the default global install location when selecting the best framework for running the application. The default is typically C:Program Filesdotnet
, which is where the installers install .NET.Run Macos Apps On Linux Windows 10
Docker
Containers provide a lightweight way to isolate your application from the rest of the host system. Containers on the same machine share just the kernel and use resources given to your application.
.NET can run in a Docker container. Official .NET Docker images are published to the Microsoft Container Registry (MCR) and are discoverable at the Microsoft .NET Docker Hub repository. Each repository contains images for different combinations of the .NET (SDK or Runtime) and OS that you can use.
Microsoft provides images that are tailored for specific scenarios. For example, the ASP.NET Core repository provides images that are built for running ASP.NET Core apps in production.
Run Macos Apps On Linux Mint
For more information about using .NET in a Docker container, see Introduction to .NET and Docker and Samples.
Next steps
- How to check if .NET is already installed.
- Tutorial: Hello World tutorial.
- Tutorial: Create a new app with Visual Studio Code.
- Tutorial: Containerize a .NET Core app.