Posted on

Best Legit Methods to Earn Money Online

earn money

Monetize Website with Google AdSense

  1. Buy a domain & hosting
  2. Get a content-based website developed according to policies of Google AdSense
  3. Register for Google AdSense program.
  4. After approval of AdSense account, put AdSense ads on your website.
  5. Get traffic by SEO optimization or paid social media marketing like facebook ads and twitter ads or buy traffic from fiverr.
  6. When a visitor will click on any ad by Google, you will earn.
  7. When you reach AdSense threshold (vary from country to country), you will be paid in your bank.

Monetize Website with Media.net (Microsoft Project)

  1. Buy a domain & hosting
  2. Get a content-based website developed according to policies of Media.net policies
  3. Register for Media.net contextual ads program.
  4. After approval of Media.net account, put Media.net ads on your website.
  5. Get traffic by SEO optimization or paid social media marketing like facebook ads and twitter ads or buy traffic from fiverr.
  6. When a visitor will visit your website and ads get impressions, you will earn.
  7. When you reach Media.net threshold (vary from country to country), you will be paid in your bank.

 

Do Freelancing

If you are a skilled person or artist, you can earn by doing freelancing. You can develop software, websites, logo, posters, videos. For this purpose,

  1. Create profile on fiverr.com or freelancer.com or upwork.com
  2. Setup your profile
  3. Start bidding on projects
  4. As soon as you get a project awarded, work on it.
  5. Deliver your project with best solution.
  6. Get paid and reviewed by client.

Start a web hosting company

  1. Get a domain
  2. Buy a reseller plan from any hosting company
  3. Setup your WHMCS
  4. Market your packages using Google AdWords, Max Bounty and Facebook ads.
  5. When a customer will buy your package, you will get paid in your account.

Start your own social network

  1. Get a domain and web hosting
  2. Get your social network developed
  3. Register your social network with Google AdSense and other contextual ads networks.
  4. Gain members.
  5. You will be get paid for clicks on ads as well as visits of website.

Start a drop shipping store

  1. Get a domain and web hosting
  2. Setup your online ecommerce store
  3. Get some plugins for dropshipping to import data of products from famous sites like amazon, ebay and ali express.
  4. Set your profit percentage.
  5. Do marketing by SEO and paid marketing networks like Facebook Ads and Google AdWords.
  6. When you receive an order, you will get payment from customer. Use this payment to place order on original store with customer details.
  7. Keep your profit and send the product directly to customer.

Start an E-commerce store

  1. Get a domain and web hosting
  2. Setup your online ecommerce store
  3. Add your products
  4. Do marketing by SEO and paid marketing networks like Facebook Ads and Google AdWords.
  5. Try to market only 1-2 products at a time to get better results.
  6. When you receive an order, send the product to customer.
  7. Keep your profit.

 

Do affiliate marketing

There are some networks who pay you for their marketing. The best one is MaxBounty.com

You can do marketing via social media and other marketing channels. You will get paid for each sale, each sign up and any other task assigned to you.

Invest in Bitcoins

Bitcoins exchange is one of the most popular and best business if you have big investments. As bitcoin price is increasing day by day, buying bitcoins from blockchain or any other wallet is not a bad idea. Buy some bitcoins and keep them for 1 month. After 1 month sell them. You will earn huge profit.

Do forex exchange

You can do forex exchange business online. You can buy different currencies and sell them.

Earn with Facebook

  1. Create a page on facebook
  2. Advertise it and gain likes on that page
  3. Get a domain registered and web hosting
  4. Sign up for facebook audience network and setup facebook instant articles.
  5. Write articles on website and share them on facebook and mark them as instant articles.
  6. You will earn for impressions and clicks on ads shown by a facebook on your articles.
  7. You can also earn on pages by sharing links of other people by doing their marketing. For this purpose, you can join mylikes.com
  8. You will be paid via PayPal.
Posted on

Setup Minecraft Server – Debian or Ubuntu OS?

How to setup your Minecraft Server?

Minecraft is one of the most played games worldwide. Minecraft is a very popular game with more than 100 million users from all over the world. In a 3D generated place, the players explore & build anything that they want. You can play as a single player or your friends can join your server in multiplayer mode.

To setup Minecraft server on Debian or Ubuntu, follow the tutorial below. This tutorial is compatible with The World of Color release 1.12.

Note: This guide is tested for Ubuntu 16.04 LTS & Debian 8.

Prerequisites:

  1. You must have Alibaba Cloud Elastic Compute Service (ECS). To get free $300 credits in your Alibaba Cloud account “Click Here”. OR You can get a Linode VPS.
  2. You must have a version of game client from https://www.minecraft.net to use your Minecraft server.
  3. You should set up your server’s hostname.
  4. Follow the general instructions to secure your server e.g. activating firewalls.

Minimum Requirements for these settings:

  1. Ubuntu 16.04 installed or Debian 8 installed on the server
  2. 2GB RAM required (4GB Recommended)
  3. Fast Internet (Provided with every ECS on Alibaba Cloud OR Linode Linux VPS)

Before you begin:

Before you begin installation of Minecraft on your server, you will have to follow steps below:

  1. Login as root user with your root username & password via SSH client (e.g. Putty) or VNC console available in your AliBaba Cloud account dashboard.
  2. You will have to update & upgrade your Debian or Ubuntu to latest packages using the following commands:
# sudo apt update && sudo apt upgrade

How to setup Minecraft Server

Select “install the package maintainer’s version” option and then select OK.

How to setup minecraft server

 

3. Now you have to setup Java JDK environment & GNU Screen. For this, install OpenJDK & GNU Screen Package. OpenJDK is an open source available implementation of Java.

 

Install GNU Screen Packages:

To install GNU Screen Packages in Debian or Ubuntu, use the following commands:

  1. Update the packages using the following commands:
# sudo apt-get update

how to setup minecraft server

 

# sudo apt-get upgrade

How to setup minecraft server

2. Now install screen using the following commands:

# sudo apt-get install screen

How to setup minecraft server

 

Install OpenJDK:

In Debian 8:

Use the following command for installing OpenJDK with GNU Screen Package in Debian 8.

# sudo apt install openjdk-8-jre-headless screen

How to setup minecraft server

 

In Ubuntu 16.04:

Use the following command for installing OpenJDK with GNU Screen Package in Ubuntu 16.04.

# sudo apt install openjdk-8-jre-headless screen

How to setup minecraft server

4. Now you have to create a user with root privileges:

In Debian:

In Debian, sudo is not enabled by default. You have to install sudo first. Use the following command:

# apt install sudo

 

How to setup minecraft server

Now add user using the following command:

# adduser minecraft

How to setup minecraft server

Now give root privileges to added user:

# adduser minecraft sudo

How to setup minecraft server

In Ubuntu:

In Ubuntu, you don’t need to install sudo manually. Just add the user using the following command:

# adduser Minecraft

How to setup minecraft server

Now give root privileges to added user:

# adduser minecraft sudo

 

How to setup minecraft server

 

5. If you have activated firewalls, you will have to define a rule in AliBaba Cloud security group for your cloud server to add exception for port 25565. By default, this port is blocked by the firewalls.

 

To do this follow the given instructions in snapshots:

Go to your Elastic Compute Service section:

How to setup minecraft server

Click on more button for ECS you are making ready for Minecraft Server:

How to setup minecraft server

 

Click on Configure Rules:

 

How to setup minecraft server

Add the configurations as shown in the screenshot below & click OK.

How to setup minecraft server

 

Installation of Minecraft:

 

  1. To install Minecraft, first of all logout from your “root” account by ending SSH session in your SSH client that you are using (In my case, I used putty SSH client.).
  2. Login back to via SSH client or VNC console available in your AliBaba Cloud account dashboard as user “minecraft” that we created with root privileges.
  3. Now you have to download latest version of the Minecraft Multiplayer Server from https://www.minecraft.net using the following command:
# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12/minecraft_server.1.12.jar

How to setup minecraft server

 

Note: You can replace the above URL with latest release URL. You can check latest release from https://minecraft.net/en/download/server

Now you have to create a script to run your Minecraft Server. You can do this as below:

  • Open file using the command below:
# sudo nano /home/minecraft/run.sh

How to setup minecraft server

  • Add the following lines in the opened file.
  1. #!/bin/sh
  2. BINDER=$(dirname “$(readlink -fn “$0”)”)
  3. cd “$BINDIR”
  4. java -Xms1024M -Xmx1536M -jar minecraft_server.1.12.jar -o true

     

    How to setup minecraft server

  5. Now Press “Ctrl+x”.
  6. Now Press “Y”.
  7. Now Press Enter Key to save the file.
  8. Now make run.sh an executable file by using the following command:

 

# sudo chmod +x /home/minecraft/run.sh

How to setup minecraft server

Note: Xmx & Xms are the flags that are used to define maximum and minimum RAM respectively that will be used by your Minecraft server. Above settings are recommended for Alibaba Cloud’s Elastic Compute Service (ECS) with 2GB RAM. If you have more available RAM, you can modify flag settings according to your desire.

Now Run Minecraft:

  • When you will run Minecraft server first time using the following command, EULA file will be created and it will exit from running state.
# ./run.sh

How to setup minecraft server

  • Open eula.txt file using the following command:
# sudo nano /home/minecraft/eula.txt

How to setup minecraft server

  • Now change the value of eula in opened file to “true”.
  • Now Press “Ctrl+x”.
  • Now Press “Y”.
  • Now Press Enter Key to save the file.
  • Now to ensure that your Minecraft Server runs without SSH connection, use the following command to execute run.sh within your GNU Screen session:

 

# screen /home/minecraft/run.sh

 

Minecraft Server will create required configurations files & generate Minecraft World.

  • To disconnect yourself from server session without stopping the server, Press “Ctrl+a” & then press “d”. You can resume the screen session using the command:
# screen -r

Now Connect to your Minecraft Server:

  1. Now open your Minecraft client and login. After logging in, select Multiplayer
  2. Then select Add Server and enter your AliBaba Cloud Elastic Compute Service (ECS) instance IP address or domain name. Then select
  3. Your server is available now for incoming connections. Select Join Server to connect to the server.
Posted on

How to get FREE SSL certificate for any website?

get free ssl certificate

Get free SSL certificate for your website. Whether you are using shared hosting for your website or you have a VPS or dedicated server, it does not matter, you can get free SSL certificate for your website. On a shared hosting, you can ask your web hosting provider to install Let’s Encrypt in your control panel so that you can install unlimited free SSL certificates on any domain. If you are using an unmanaged VPS or a dedicated server, follow the procedure below to install Let’s Encrypt and get free SSL certificate for unlimited domains.

Getting started with Let’s Encrypt for Free SSL & TLS Certificates

Now it’s time to switch to HTTPS & secure your websites. Let’s Encrypt is an SSL certificate authority that provides free SSL certificates to enhance security. It provides a certificate for TLS encryption. Let’s Encrypt prevents you from hassles of creating manual creation, validation, signing, installation & renewal of SSL certificates and utilizes Automated Certificate Management Environment (ACME) to issue SSL automatically. Let’s Encrypt is managed by Internet Security Research Group (ISRG).

This tutorial will cover the following topics:

  1. How to install Let’s Encrypt ACME client?
  2. How to obtain Let’s Encrypt certificates?
  3. Checkup & Maintenance
  4. Technical details regarding Let’s Encrypt
Note: This tutorial is specific for Ubuntu / Debian and CentOS. Commands may vary depending upon the other distributions of Linux.
Important: The tutorial is written for non-sudo users ( non-root users ). To execute any command with root privileges, you must prefix command with ‘sudo’.

Prerequisites

Before proceeding, you must have a running server on Alibaba Cloud or any other VPS provider of your choice. If you don’t have you can Sign up to get free $300 in credit Alibaba Cloud. Create a new ECS server according to your required demands. If you already have ECS server on Alibaba cloud, you can use it. You can access ECS server via SSH from your Alibaba Cloud console, or you can use Putty to access your Alibaba Cloud server.

get free ssl certificate

 

Step 1: Update Server’s Software Packages

Before you begin to install Let’s Encrypt, you must update your server’s software packages by using the following commands:

CentOS

# sudo yum update && sudo yum upgrade

 

Ubuntu / Debian

# sudo apt-get update && sudo apt-get upgrade

 

get free ssl certificate

 

You will be asked to enter your password. Enter your password for the logged as user.

After entering passwords, you will be asked “Do you want to continue? [Y/n]”

Press ‘Y’ & then press enter key.

 

get free ssl certificate

Step 2: Install Git

In the second step, you will have to install Git on your server to begin installation of Let’s Encrypt from official GitHub repository. To install Git, use the following commands:

 

CentOS

# sudo yum install git

 

Ubuntu / Debian

# sudo apt-get install git

 

You will be asked to enter your password. Enter your password for the logged as user.

get free ssl certificate

After entering passwords, you will be asked “Do you want to continue? [Y/n]”

Press ‘Y’ & then press enter key.

get free ssl certificate

 

Step 3: Download & Install Let’s Encrypt

Get your clone of Let’s Encrypt from official GitHub repository and install it to

/opt/letsencrypt

Execute the following command to clone:

Ubuntu / Debian / CentOS

# sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

You will be asked to enter your password after executing the command. Enter your password for the logged as user.

get free ssl certificate

Navigate to new directory /op/letsencrypt using the commands below:

# cd /opt/letsencrypt

get free ssl certificate

Note: /opt is a commonly used installation directory for 3rd party packages, you can change if you can handle easily.

Step 4: Create SSL certificate

Certificate Authority (CA) will authenticate your domain based on challenges that Let’s Encrypt performs automatically for Domain Validation using a series of challenges. Once your Alibaba Cloud has been validated, you will be issued SSL certificate by Certificate Authority (CA).

Note: Each domain & its sub-domain will have its own separate certificate. Let’s Encrypt does not issue wildcard certificates.

To create SSL certificate for a single domain using Let’s Encrypt, use the following command:

# sudo -H ./letsencrypt-auto certonly --standalone -d myweb.com
Note: myweb.com will be replaced by your own domain.

To create SSL certificate for more than 1 website, you can add -d myweb.com to the end of command. See the following command:

# sudo -H ./letsencrypt-auto certonly --standalone -d myweb1.com -d myweb2.com

 

You will be asked to enter your password after executing the command. Enter your password for the logged as user.

get free ssl certificate

After executing the above command, you will be asked to enter email address. Put email address here, it will be used later in case to regain control of lost certificate & receive security notices urgently. Press “TAB” button to navigate to given options and press “Enter” to select operation.

 

get free ssl certificate

 

Agree to terms & conditions as shown below.

get free ssl certificate

If the process went great, you will see the message below. The appearance of this message tells that Let’s Encrypt has approved & issued certificates for your desired domains.

IMPORTANT NOTES:

- If you lose your account credentials, you can recover them through

  e-mails sent to [email protected]

- Congratulations! Your certificate and chain have been saved at

  /etc/letsencrypt/live/myweb.com/fullchain.pem. Your

  cert will expire on 2018-02-28. To obtain a new version of the

  certificate in the future, simply run Let's Encrypt again.

- Your account credentials have been saved in your Let's Encrypt

  configuration directory at /etc/letsencrypt. You should make a

  secure backup of this folder now. This configuration directory will

  also contain certificates and private keys obtained by Let's

  Encrypt, so making regular backups of this folder is ideal.

- If you like Let's Encrypt, please consider supporting our work by:



  Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate

  Donating to EFF:                    https://eff.org/donate-le

 

Structure of Let’s Encrypt Directory

  1. List the files in /etc/letsencrypt/live directory by using the following command:

 

# sudo ls /etc/letsencrypt/live

 

  1. Each domain for which you created SSL certificate has its own directory. List these domain name directories using the following command:
# sudo ls /etc/letsencrypt/live/myweb.com

 

After execution of the above command, you will see output:

 

cert.pem

chain.pem

fullchain.pem

privkey.pem


Each output file has different purpose:

  1. pem: shows server certificate only
  2. pem: shows intermediate & root certificates only
  3. pem: shows combination of root, server and intermediate certificates
  4. pem: It is a private key. It must not be shared with anyone.

Identrust cross-signs the certificates and ensures compatibility between different browsers and certificate.

These files point to different file. These are their symbolic links to actual certificate files. Actual certificate files are located in /etc/letsencrypt/archive directory.

You can see the status of fullchain.pem by executing following command:

# sudo stat /etc/letsencrypt/live/myweb.com/fullchain.pem

Output will be:

File: ‘live/myweb.com/cert.pem’ -> ‘../../archive/myweb.com/cert1.pem’

 

Note: In case if you forget to renew your domain’s SSL certificate, Let’s Encrypt will remove directory from /etc/letsencrypt/live but it will be retained in /etc/letsencrypt/keys & /etc/letsencrypt/archive. 

Maintenance:

How to renew SSL certificates?

To renew SSL certificate issued using Let’s Encrypt, follow the steps below:

  1. Navigate to /opt/letsencrypt directory by executing the command below:
# cd /opt/letsencrypt

 

  1. Execute the following command to renew SSL:
#sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d mydomain1.com -d www.mydomain2.com

 

If the process went great, you will see a confirmation message as:

IMPORTANT NOTES:- Congratulations! Your certificate and chain have been saved at  /etc/letsencrypt/live/example.com/fullchain.pem. Your  cert will expire on 2018-02-28. To obtain a new version of the  certificate in the future, simply run Let's Encrypt again.- If you like Let's Encrypt, please consider supporting our work by:   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate  Donating to EFF:                    https://eff.org/donate-le

 

Note: Let’s Encrypt SSL expires in 3 months (90 days). So, you must renew it in within 90 days of issuance date.
Posted on

How to install .NET on Fedora?

install .NET on Fedora

Install .NET on Fedora Linux

Before getting started to install .NET on Fedora Linux, you will need to update products available for installation and install components required by .NET and then proceed for .NET SDK installation.

Install .NET on Fedora 26 or more recent versions.

Open command prompt and execute the following commands:

~$ sudo dnf update
~$ sudo dnf install libunwind libicu compat-openssl10
~$ sudo dnf install dotnet-sdk.2.0.2

Install .NET on older versions of Fedora.

Open command prompt and execute the following commands:

~$ sudo dnf update
~$ sudo dnf install libunwind libicu
~$ sudo dnf install dotnet-sdk.2.0.2

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Posted on

How to install .NET on CentOS / Oracle?

How to install .NET on CentOS / Oracle?

Install .NET on CentOS or Oracle

To get started to install .NET on CentOS or Oracle, you need to add the dotnet product feed first. You will register Microsoft signature key. This is required once per machine.

Open your command prompt and execute the following commands:

~$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
~$ sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl= https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/dotnetdev.repo'

Now you will have to install the .NET SDK. To install .NET SDK, open your command prompt and execute the following commands:

~$ sudo yum update
~$ sudo yum install libunwind libicu
~$ sudo yum install dotnet-sdk-2.0.2

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Posted on

How to install .NET on SLES / open SUSE?

How to install .NET on SLES / openSUSE?

Install .NET on your SLES or open SUSE

In order to install .NET on SLES or open SUSE, you will need to register Microsoft signature key & add Microsoft Product feed. This has to be done only once per machine.

Now open cmd (command prompt) or terminal and run the following commands:

~$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
~$ sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl= https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/dotnetdev.repo'

Now we will proceed towards installation of .NET SDK. To get started, update the products available for install & install components required for .NET installation. After this install .NET SDK using the following commands:

~$ sudo zypper update
~$ sudo zypper install libunwind libicu
~$ sudo zypper install dotnet-sdk-2.0.2

While installation of SDK, openSUSE & SUSE may report that libcurl is not provided. libcurl should be installed on supported versions of both Linux. You can execute the following command to confirm about libcurl, then press for Solution 2 to continue installing .NET.

~$ zypper search libcurl

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Posted on

How to install .NET on Debian?

install .NET on Debian

Install .NET on Debian to get started with .NET

Let’s proceed towards the installation of .NET on Debian. Before moving towards .NET, you will need to setup few components in the system, registering of Microsoft signature key & Microsoft Product feed. You need to do this once per machine.

To install system components, open your command prompt or terminal and run the following commands.

~$ sudo apt-get update
~$ sudo apt-get install curl libunwind8 gettext apt-transport-https

Now register the trusted Microsoft Product key by using the following commands:

~$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
~$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Now register the Microsoft Product feed on Debian 9 (Stretch) by using the following commands:

~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/dotnetdev.list'

OR register the Microsoft Product feed on Debian 8 (Jessie) by using the following commands:

~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main" > /etc/apt/sources.list.d/dotnetdev.list'

Before you begin to install .NET SDK, use the following commands to update the products available for installation.

~$ sudo apt-get update
~$ sudo apt-get install dotnet-sdk-2.0.2

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Posted on

How to install .NET on Ubuntu Linux?

install .NET on Ubuntu

Install .NET on Ubuntu

Let’s learn how to install .NET on Ubuntu Linux on different versions of Ubuntu. In the first step, we will register the trusted Microsoft signature key by using the following commands:

~$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
~$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Now register the Microsoft Product feed on Ubuntu 17.10 by using the following commands:

~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > /etc/apt/sources.list.d/dotnetdev.list'

Now register the Microsoft Product feed on Ubuntu 17.04 by using the following commands:

~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-zesty-prod zesty main" > /etc/apt/sources.list.d/dotnetdev.list'

Now register the Microsoft Product feed on Ubuntu 16.04 / Linux Mint 18 by using the following commands:

 ~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

Now register the Microsoft Product feed on Ubuntu 14.04 / Linux Mint 17 by using the following commands:

 ~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'

Now you can proceed to install & run the .NET SDK.

Open your terminal or command prompt and execute the following commands to update the products available for installation:

~$ sudo apt-get update
~$ sudo apt-get install dotnet-sdk-2.0.2

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!

Posted on

.NET for Linux – How to enable .NET on Linux OS

.NET for Linux

.NET for Linux is not less than a revolutionary step taken by Microsoft.

.NET for Linux was never available before. Linux is being loved by most of the developers, it’s time for these developers to get comfortable & start .NET experiments on their Linux OS. Now .NET Core is available for any platform, no matter, its Windows, MacOS, Linux or a television OS: Tizen by Samsung. The developers can write and run C# apps on Linux. Xamarin will be also supported by Linux. .NET Core is open source.

What are the supported Linux for .NET Core?

You can easily run .NET Core on a number of mostly used distributions of Linux including Ubuntu, Debian, CentOS, Fedora, SUSE, Oracle and Red Hat Enterprise. Installation procedure for each distribution of Linux is different from other.

Getting started with .NET

Check out the tutorials below:

 

Posted on

How to install .NET on Red Hat Enterprise Linux?

install .NET on Red Hat

Install .NET on Red Hat Enterprise Linux 7

To install .NET on Red Hat, first of all, you need to register via Red Hat Subscription Manager. Then we will proceed towards .NET core installation.

How to register via Subscription Manager? (Learn here)

If you have registered via Subscription Manager and enabled your .NET core channel, you can proceed to install & run the .NET SDK.

Open your terminal or command prompt and execute the following commands:

~$ yum install rh-dotnet20 -y
~$ scl enable rh-dotnet20 bash

Now you have to create your app. Close the command prompt and reopen it. Now, type the following commands:

~$ dotnet new console -o myApp
~$ cd myApp

The dotnet command will create the new app of console type. The -o parameter will create new folder or directory naming it myApp. Your app and its files will be stored here. To navigate to newly created folder myApp, you will use cd myApp command. There will be a file Program.cs in myApp folder which contains hello world code.

using System;

namespace myApp

{

class Program{

static void Main(string[] args){

Console.WriteLine("Hello World");

}

}

}

 

Now its time to run your app. To run your app, open your command prompt or terminal and write the following command and press enter to execute.

~$ dotnet run

 

Thanks for reading our tutorial. Check more!