Python Forum
Python to interact with the Linux Command Line - Centos/RHEL
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python to interact with the Linux Command Line - Centos/RHEL
#1
Hi,

This is part of my project. If I have a Python script ready to work on CLI as menu-driven to perform certain System Administration tasks on a Linux Server like monitoring, check history logs, install required package, perform a reboot, backup configuration, manage user accounts/website files on the server, transfer accounts, etc, how I can create a web interface for the same to work through a website(not a public hosted website but has only internal access for staff)?. Through the web interface, it will be much easier to do that tasks

What are the exact requirements to accomplish this for having Python interact with the Linux(Centos/RHEL) command line in depth through the web interface?.
Reply
#2
dont know if i understand well, but it should be possible making a website interface - just as a wrapper (similarly like a gui interface) around the cli.

you can make a website with a menu option for instance and by clicking a button a particullar command will send as subprocess to cli, then response from cli will be saved and send to web interface.

just learn some web framework, flask would be good for this i believ
Reply
#3
(May-09-2020, 04:52 PM)experimental Wrote: dont know if i understand well, but it should be possible making a website interface - just as a wrapper (similarly like a gui interface) around the cli.

you can make a website with a menu option for instance and by clicking a button a particullar command will send as subprocess to cli, then response from cli will be saved and send to web interface.

just learn some web framework, flask would be good for this i believ

Thank you very much @experimental for your reply.

I will look into that further.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dropdown interact moisesfelipee 0 873 May-04-2020, 01:11 AM
Last Post: moisesfelipee
  can't use pip on CentOS 7 Sakurami 1 1,568 Apr-15-2020, 02:59 AM
Last Post: Larz60+
  virtual environment is not activating in centOS Anu 5 1,797 Dec-16-2019, 10:48 AM
Last Post: Anu
  command line: python -c 'code here' Skaperen 7 5,190 Mar-24-2018, 08:31 AM
Last Post: Gribouillis
  Beautiful soup opens python command line and nothing happens Prince_Bhatia 4 3,308 Aug-01-2017, 11:50 AM
Last Post: Prince_Bhatia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020