[SOLVED] Kubuntu 21.04 - How to close terminal automatically after bash is done?
by Snugbug from LinuxQuestions.org on (#5KTDE)
If I have a bash file like this
Code:#!/bin/bash
some commands...
more commands...
exitthe exit command ...doesn't work, so the terminal doesn't close.
exit 0
exit 1
exit N
&& exit , after the last command, none of these are working.
The strange thing is, all distros I know so far do support the exit command. Why not Kubuntu?
How can I make the terminal close automatically(!) after the bash is done?
EDIT:
Never mind!
I've got it!
The required command is:
Code:kill -9 $PPID
Code:#!/bin/bash
some commands...
more commands...
exitthe exit command ...doesn't work, so the terminal doesn't close.
exit 0
exit 1
exit N
&& exit , after the last command, none of these are working.
The strange thing is, all distros I know so far do support the exit command. Why not Kubuntu?
How can I make the terminal close automatically(!) after the bash is done?
EDIT:
Never mind!
I've got it!
The required command is:
Code:kill -9 $PPID