You are currently viewing Install and Run Python Script in Linux OS

Install and Run Python Script in Linux OS

Hello!! all my dear visitors, welcome again in this domain Today I am going to write a blog post for you and I hope you all are very excited to read this blog post, please give me your golden feedback for encourage my skill and blogging.

Today’s blog is fully dedicated to Writing and Compiling Python Program with Command line in Linux, so let’s see how you can write program with command lines.

It’s easy to create and run a Python program on Linux platform, you just have to do this–:

  • Write your program code in a text editor.
  • Save your program with .py extension.
  • And then compile and run on the command prompt by giving appropriate command.

Note -: You can work with the GUI editor like sublime text, atom, brackets etc.

Firstly make sure that Python is installed on your LINUX Operating System or not, if however you don’t have Python on your operating system you can follow the instruction given below –:

I) To install Python on your LINUX operating system,

open the terminal or command prompt on your Linux based OS and then type the following commands–:

$ sudu apt-get update
$ sudu apt-get install python3.6 

Coding in text editor.

  1. Open Sublime Text. Press the window key and search for sublime text, you will find an option to open Sublime text. click on the icon and it will appear on you system’s screen.
  2. Create a New File. or use command File→ New or press Ctrl+N on the keyboard.
  3. A new untitled file will open.
print("Hello World")  

4. Now save the file with proper extension by using command File→Safe or press Ctrl+S from the keyboard, save dialogue appears, write the name of file and give an extension .py .

Compiling and Running the Code using the Terminal.

  1. Open the terminal. Press Ctrl+Alt+T from the keyboard a command prompt will appear in screen.
  2. Go to the folder where you save the file, type the following command in front of the prompt and press enter.python<filename>.py. For example–: if your fiil name is then you should type following command 👉 .
  3. It will compile and run your program you will see the output of the program in the terminal window.

Thank you so much friends it’s enough for today we’ll meet soon with our new blog post till then keep learning and keep exploring :⁠-⁠)

Read more blog post -:

[Instagram Hack]|HiddenEye Hacking Instagram With Kali Linux 2020
How to install Linux OS on your android device?
How to Spy on Someone using (MITM) Man in the Middle attack?
How to Hack Someone’s Wi-Fi Password with aircrack-ng tool
Advance Jamming: Jam Wireless Network using MDK3 tool with Kali Linux
How to Jam Wireless Network(Wi-Fi) with Kali Linux | 2020
Top 10 Commands for Kali Linux Users || 2020
How to Split single Kali Linux terminal into multiple
How to hack Bluetooth devices?
How to download Instagram stories, reels, posts
How to Record WhatsApp Video Call in an Android mobile phone?.
How to create a youtube video thumbnail in ms paint?
How to schedule a WhatsApp message?
How to chat offline with your friends on WhatsApp?
Top 5 Entertainment Apps for Android Users: Short break from Study
What is the Multiplexing technique: Computer Networking Concept
How to create a YouTube channel playlist from mobile phones or PC?

Share post

Prajjwal Singh

Tech Blogger || Web developer || Computer Networking Enthusiast || Microsoft SQL Database Management Expert || Software Debugger || Learned DOS OS Structure

Leave a Reply