LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-10-2019, 09:00 AM   #1
creatxr
LQ Newbie
 
Registered: Apr 2019
Posts: 3

Rep: Reputation: Disabled
how to exit from command "source" and keep shell window?


how to exit from command "source" and keep shell window?

if i use "exit" , it will close shell window.

i want to "exit" from "source" , but keep opened shell window.

thanks
 
Old 04-10-2019, 09:37 AM   #2
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627

Rep: Reputation: Disabled
Quote:
Originally Posted by creatxr View Post
how to exit from command "source" and keep shell window?

if i use "exit" , it will close shell window.

i want to "exit" from "source" , but keep opened shell window.

thanks
Try
Code:
clear
If you've used su - or su to gain root access, then you can use exit to return to standard user.
 
Old 04-10-2019, 09:49 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
While "clear" will clear the screen for a terminal, or xterm session, CTRL-C will exit an existing program that may be running, which currently stops a terminal from accepting input. One can also use CTRL-Z to break, and then type "bg" to put a running program into the background.

What would be helpful here is a better description of what the exact problem is.
 
Old 04-10-2019, 10:58 AM   #4
creatxr
LQ Newbie
 
Registered: Apr 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
"clear" and "ctrl+z" not work

that's a python project,

use command "source venv/bin/activate"

and get shell as : "(venv) creatxr@laptop:"

i want to exit from "(venv)"

return to "creatxr@laptop:"

the two commands cannot do that

if i use "exit" command , the shell window will close
 
Old 04-10-2019, 11:19 AM   #5
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Try 'deactivate'.
 
1 members found this post helpful.
Old 04-10-2019, 11:39 AM   #6
creatxr
LQ Newbie
 
Registered: Apr 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgrlscz View Post
Try 'deactivate'.
that's work.

thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single Command To Close Window and Return Exit Code jagooch Programming 3 01-02-2009 03:33 AM
How to exit and save (or just to exit) inside a "make config" running command? scrat75 Linux - Kernel 6 09-05-2008 04:02 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
difference between exit 1 and exit kushalkoolwal Programming 6 10-20-2005 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration