Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to "refresh" the terminal/iTerm without closing the current sessions?

I just updated my xcode command line tool in my iTerm2 and it seems like I need to restart my iTerm to put that to work, since when I try to use

tns build ios

command to build my nativescript project for iOS, it always echos back

xcodebuild execution failed. Make sure that you have latest Xcode and tools installed.

which shouldn't be true. However, I am having a session that's currently running to upload a huge file to my cloud drive which has spent 7 hours to have uploaded 37%, and it doesn't support resume uploading from a break-point.

So, is there any way to refresh the terminal without closing the active session?

Thanks guys

like image 930
Billy Chen Avatar asked Jan 05 '18 08:01

Billy Chen


People also ask

How do I refresh my Mac terminal?

So, if you wanna restart the terminal, just enter rest (short for restart) in your terminal.

How do you save Iterm history?

There is the option to save a log of your session to a file, however, by default this isn't done. To activate the session logs, go to iTerm2 Preferences (⌘,), select the "Profiles" tab, then the "Session" tab. Under "Miscellaneous" you can specify a folder where log files for your sessions shall be saved in the future.


Video Answer


1 Answers

Not trying to steal answers here. But the answer is in the comment by @BillyChen

source ~/.bash_profile
source ~/.zsh_profile or source ~/.zshrc

It depends on what shell you're using to pick up the proper profile. Some use a common .profile as well

source ~/.profile
like image 87
Dylan Wright Avatar answered Sep 25 '22 02:09

Dylan Wright