Different shell prompt than usual in Linux terminal
My shell prompt appears to have changed , not sure what I did to cause it though. I am new to linux.
How it appears
How I want it to appear
You can change your shell prompt to be whatever you want. In your case, do the following:
Type into the command line:
Look for the following line (ctrl + F)
and replace with
then save and exit. New instances should have your desired prompt
See also questions close to this topic
Opening a Virtual Keyboard on linux with python 3
So, I have been working on a project on my raspberry pi 3, that needs to open a virtual / onscreen keyboard during execution when a particular input is given, from python 3.
First I need a good virtual keyboard... Any recommendations? pls give names of good v.keyboards and how to install them by the terminal.
Second, I need to open that virtual keyboard during execution of python code. How I thought we could do this, is by finding a way to open that v.keyboard, with the terminal, if possible and use the
import osand use
os.system()and write the code line of opening that v.keyboard by the terminal in os.system()…
Is this possible, or any other way? pls help...
I want to copy a column from file to be the first column in another file using Linux command line
I want to copy a column from file to be the first column in another file contains many columns. How can I do that using the command line?
file 1 as
1 2 2 - -
file 2 as
2 5 3 5 3 5 - - - -
I want fil3 as
1 2 5 2 3 5 2 3 5 - - - - - -
What are the precautions I need to follow before deleting my WINDOWS OS and keeping only UBUNTU?
So I have been using Ubuntu for a long time and I hardly use windows anymore. I have decided to remove windows OS and keep only ubuntu. My laptop specs are 1TB memory 8gb RAM i-5 7th gen. 4 cores.
I had only alloted 100GB for my UBUNTU and rest 900GB is for windows. Where c drive is 351 gb, D drive is 441 gb and some lenovo drives that add up to around 50gb. I have copied all my important files into a hard disk.
When I remove my windows does my system automatically allot the 900gb to ubuntu? I am not concerned with my data in windows. But I want to know what precautions I need to take before deleting windows.
How to handle information of certificate in a PEM file
I exported certificates from keychain to a PEM file. I want to handle information of each certificate in a loop by writing a shell-script file.
When I run this command to check the file:
openssl crl2pkcs7 -nocrl -certfile [file name here].pem | openssl pkcs7 -print_certs -text | grep -E '(Subject:|Not After)'
All certificates's information will be printed. But when I run this command:
openssl x509 -in certs.pem -text
It only shows information of the first certificate in the file. I tried to get count of certificate in the PEM file with a shell, it returned 1.
#! /bin/bash i=0; for cert in [PEM file path]; do let "t=$i + 1"; echo $t; done
Could anyone help me to handle certificates in PEM file?. Thank you so much.
Difference between starting a background process in BASHRC vs Command Line
I am trying to background a process automatically.
nohup program > /tmp/program.log 2>&1 < /dev/null &
If I check if the process is running and start it on login via ".bashrc", the program starts but then DIES when I exit.
BUT if I do exactly the same command on the command line, the program continues to run, in background, when I exit.
I can't find any difference in program environment between a bashrc start and a cli start. (The bashrc has almost nothing in it). My understanding the program in both cases should be treated the same.
What is the difference, and how can I stop a bashrc started 'daemon' being killed when the shell exits.
PS: removing nohup makes no difference. and I have watched the program running then dying from a separate login, when the starting login exits.
And before someone says anything... Adding "disown" after backgrounding the program in the bashrc did NOT fix it!
How to run a post build action when the build status changed from Stable to Unstable/Fail
We want to publish some information (time, build no, GIT Author etc.) to confluence when our Jenkins build status change from stable to unstable/failed but not in subsequent consecutive failures.
We tried using flexible publish with conditional actions. But conditional actions only allow to specify best/worse conditions of current build. There is no way to compare it with the status of previous build.
We would like to use plugins and shell scripts over groovy scripts.
Keep SSH session alive when IP changes
I have an AWS EC2 Ubuntu 16.04 machine set up to change IP every 5 minutes. I need to work via SSH on it, but this is obviously hard as the terminal console freezes and then I have to reconnect by typing the new IP. An alternative I tested already is to use noip.com, with a dynamic DNS, but the console still freezes and I normally need to wait for a couple of minutes until the DNS propagates.
Do you know any possible option to solve this problem? I want to keep my SSH session alive despite the frequent IP changes.
How to share localhost from nginx on android to public ip ? [termux]
How do we share localhost nginx from android so that it can be accessed by all devices? or open port / firewall setup on Android? if we use ubuntu we usually use ufw and systemctl but on android I still haven't found how to use the binary or there is an alternative so I can open the port from nginx via termux. Or maybe you have an alternative solution about this, please guide it, thank you.
Route instances of CMD through different VPN connections
I want to route various instances of cmd through different vpn connections, so each instance of cmd should go through a separate vpn connection. I am using OpenVPN as a vpn.
- How to add time on git command prompt
Batch Scripting; Runas command
What is the correct syntax for the
route addcommand in command-prompt?
I have followed
route /?syntax verbatim.
Trying to add an IP route
C:\>route ADD 192.168.1.3 MASK 255.255.255.0 192.168.1.1 METRIC 3 IF 2
"The route addition failed: The parameter is incorrect"