• Courses
  • YouTube
  • Dev News
  • Technology
  • Blogs
  • Flutter Jobs
  • Contact
    • About Us
    • RegisterLogin
    Navoki
    • Courses
    • YouTube
    • Dev News
    • Technology
    • Blogs
    • Flutter Jobs
    • Contact
      • About Us
    • RegisterLogin

      Go Lang

      • Home
      • Blog
      • Go Lang
      • GOLANG SETUP IN LINUX
      Golang Linux

      GOLANG SETUP IN LINUX

      • Posted by Shivam Srivastava
      • Categories Go Lang, Developers, Uncategorized
      • Date March 23, 2020
      Spread the love

      Quick Introduction About Golang

      Golang or Go is a procedural programming language. It originally developed by Rob Pike, Robert Griesemer and Ken Thompson at Google however launched after two years as an open-source programming language. Programs are assembled by packages, for efficient management of dependencies. Golang also supports the environment adopting patterns alike to dynamic languages. For e.g., type inference (y := 0 could be a valid declaration of a variable y of type float).

      Purpose of this article?

      As we know Golang is one of the most popular languages nowadays. Today we will learn how to set up Golang in the Linux operating system with VS Code and then also make a demo project.

      Let’s Begin

      Ready2 | Golang Setup In Linux

      Install Golang

      Upgrade to apply the latest security updates on the Linux operating system.

      sudo apt-get update
      sudo apt-get upgrade

      • You need to download the Go binary file. Visit on https://golang.org/dl/ for download Golang binary file.
      • Extract download binary file on your preferable location on the system. I’m extracting it under /usr/local directory as suggested by standards.

      sudo tar -C /usr/local -xzf go1.14.1.linux-amd64.tar.gz


      Set up a Golang environment.

      • Open .bahrc file and add the below code in that file.

      export PATH=$PATH:/usr/local/go/bin

      • Now check your configuration
      • You have successfully configured the Go language on your system.

      To check the Go version:

      go version
      //as output you will get the version of Golang

      Install VSCode

      • I’m installing VSCode by Snap you can download other ways too.
      sudo snap install vscode --classic

      • Open VSCode by using the below command.
      snap run vscode

      • Open VS Code and go to Extensions and search Go then install it.

      Go Extension Image

      We have done all the setup that we will need. Now we’re creating a new file with “.go” extension and write code for the print square root of a number on a console. i.e. if you create a file by the name of first then your file should be first.go


      package main
      import(
          "fmt"                           
          "math"                         
      )                                   
      func main() {
          fmt.Println(math.Sqrt(36))      
      }                                  

      Bookmark(0)

      Please login to bookmark

      Continue with Google
      0

      Tag:go build for linux, golang download, golang tutorial, install go linux apt, introduction to golang

      • Share:
      author avatar
      Shivam Srivastava

      Mobile Solution Architect@EnrichAI, Android and Flutter Dev, Dart ,Founder of @Navoki, Instructor

      Previous post

      Golang Setup In Windows
      March 23, 2020

      Next post

      Key features of Android 11 -BGR
      March 23, 2020

      You may also like

      everything-about-flutter-3-in-google-i-o-2022 navoki.com
      Everything about Flutter 3 in Google I/O 2022
      12 May, 2022
      How Video Call works in Flutter
      How Incoming Video Call Notification works in Flutter
      15 April, 2022
      How-to-Create-Flutter-Desktop-Navoki-Blog
      How to Install Flutter on Windows, macOS and Ubuntu
      11 April, 2022


      Categories

      • Android
      • Dart
      • Dart Server
      • Dart Web
      • Developers
      • Flutter
      • Flutter Desktop
      • Flutter Mobile
      • Flutter Web
      • Fuchsia
      • Go Lang
      • Technology
      • Uncategorized

      Recent Post

      • Everything-About-Flutter-3-In-Google-I-O-2022 Navoki.comEverything about Flutter 3 in Google I/O 2022
      • Flutter-Web-Cors-Error-Solved-Navoki.com[SOLVED] Flutter Web CORS Error
      • How Video Call Works In FlutterHow Incoming Video Call Notification works in Flutter

      Subscribe Now

       

      Recent Courses

      Single And Multi Selection Listview In Flutter

      Single and Multi Selection ListView in Flutter

      Go Installation And Variables

      Go Installation and Variables

      List In Dart Programming Language

      List in Dart Programming language

      Variables In Dart Programming Language

      Variables in Dart Programming language

      View All

      DON’T MISS
      FLUTTER UPDATES

      Be the first to know when our blog is published.

      flutter-mobile-mockup

      Check your inbox or spam folder to confirm your subscription.

      Contact

      •   Navoki Technologies Pvt. Ltd.
        JMD Megapolis , Sector 48, Gurugram, Haryana 122018

      Company

      • About Us
      • Blogs
      • Contact
      • Privacy policy
      • Terms & Condition

      Useful Links

      • Courses
      • Youtube
      • Dev News

      Mobile

      Click and Get started in seconds

      "Navoki" is a registered trademark of Navoki.com ® 2020–2030 Navoki Technologies Pvt Ltd.

      • Terms & Condition

      Login with your site account

      Continue with Google

      By "Sign in” above to accept Navoki’s Terms of Service & Privacy Policy.

      Not a member yet? Register now

      Register a new account

      Continue with Google

      By "Sign Up” above to accept Navoki’s Terms of Service & Privacy Policy.

      Are you a member? Login now