How to FULLY clear terminal screen?












0















I need to clear terminal fully, so the full terminal become darkfull.



What I mean by "fully", I need to username@machine$: not to pop up so terminal after clear would be completely empty. Just like cmatrix does before drawing digital rain.










share|improve this question

























  • You want to username@machine$: never show on screen ? Can you clarify your question a little ?

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:22











  • @SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

    – V. Dalechin
    Jan 19 at 9:23











  • and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:25











  • @sudodus actually no, because I'll have to use that space.

    – V. Dalechin
    Jan 19 at 9:33











  • @SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

    – V. Dalechin
    Jan 19 at 9:33
















0















I need to clear terminal fully, so the full terminal become darkfull.



What I mean by "fully", I need to username@machine$: not to pop up so terminal after clear would be completely empty. Just like cmatrix does before drawing digital rain.










share|improve this question

























  • You want to username@machine$: never show on screen ? Can you clarify your question a little ?

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:22











  • @SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

    – V. Dalechin
    Jan 19 at 9:23











  • and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:25











  • @sudodus actually no, because I'll have to use that space.

    – V. Dalechin
    Jan 19 at 9:33











  • @SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

    – V. Dalechin
    Jan 19 at 9:33














0












0








0








I need to clear terminal fully, so the full terminal become darkfull.



What I mean by "fully", I need to username@machine$: not to pop up so terminal after clear would be completely empty. Just like cmatrix does before drawing digital rain.










share|improve this question
















I need to clear terminal fully, so the full terminal become darkfull.



What I mean by "fully", I need to username@machine$: not to pop up so terminal after clear would be completely empty. Just like cmatrix does before drawing digital rain.







gnome-terminal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 9:22







V. Dalechin

















asked Jan 19 at 9:05









V. DalechinV. Dalechin

679




679













  • You want to username@machine$: never show on screen ? Can you clarify your question a little ?

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:22











  • @SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

    – V. Dalechin
    Jan 19 at 9:23











  • and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:25











  • @sudodus actually no, because I'll have to use that space.

    – V. Dalechin
    Jan 19 at 9:33











  • @SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

    – V. Dalechin
    Jan 19 at 9:33



















  • You want to username@machine$: never show on screen ? Can you clarify your question a little ?

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:22











  • @SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

    – V. Dalechin
    Jan 19 at 9:23











  • and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:25











  • @sudodus actually no, because I'll have to use that space.

    – V. Dalechin
    Jan 19 at 9:33











  • @SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

    – V. Dalechin
    Jan 19 at 9:33

















You want to username@machine$: never show on screen ? Can you clarify your question a little ?

– Sergiy Kolodyazhnyy
Jan 19 at 9:22





You want to username@machine$: never show on screen ? Can you clarify your question a little ?

– Sergiy Kolodyazhnyy
Jan 19 at 9:22













@SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

– V. Dalechin
Jan 19 at 9:23





@SergiyKolodyazhnyy not never but the first time. You can look at cmatrix package, i need the same realization as they clear screen before drawing digital rain.

– V. Dalechin
Jan 19 at 9:23













and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

– Sergiy Kolodyazhnyy
Jan 19 at 9:25





and have you tried the reset command ? cmatrix, however, uses ncurses library, so it doesn't just clear the screen. It opens completely different text interface.

– Sergiy Kolodyazhnyy
Jan 19 at 9:25













@sudodus actually no, because I'll have to use that space.

– V. Dalechin
Jan 19 at 9:33





@sudodus actually no, because I'll have to use that space.

– V. Dalechin
Jan 19 at 9:33













@SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

– V. Dalechin
Jan 19 at 9:33





@SergiyKolodyazhnyy Yes I did, but it still shows me username@machine$:

– V. Dalechin
Jan 19 at 9:33










1 Answer
1






active

oldest

votes


















2














The command prompt format is stored in the PS1 environment variable. If you set it to the empty string, no command prompt will be displayed. You can then clear the console:





user@host:$ PS1=
clear


If you need to restore it afterwards, you can save the initial value in a different variable first:



user@host:$ PS1_INITIAL=$PS1 # store the initial value
user@host:$ PS1=
PS1=$PS1_INITIAL # restore the initial value
user@host:$


Or you can source .bashrc where the original values are defined:



. ~/.bashrc
user@host:$





share|improve this answer


























  • That looks pretty much like an answer, but how can i exit that mode?

    – V. Dalechin
    Jan 19 at 9:37











  • Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

    – V. Dalechin
    Jan 19 at 9:43











  • Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

    – danzel
    Jan 19 at 9:43











  • @V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:43











  • @SergiyKolodyazhnyy Thanks for clearing that up!

    – V. Dalechin
    Jan 19 at 9:47











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111080%2fhow-to-fully-clear-terminal-screen%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














The command prompt format is stored in the PS1 environment variable. If you set it to the empty string, no command prompt will be displayed. You can then clear the console:





user@host:$ PS1=
clear


If you need to restore it afterwards, you can save the initial value in a different variable first:



user@host:$ PS1_INITIAL=$PS1 # store the initial value
user@host:$ PS1=
PS1=$PS1_INITIAL # restore the initial value
user@host:$


Or you can source .bashrc where the original values are defined:



. ~/.bashrc
user@host:$





share|improve this answer


























  • That looks pretty much like an answer, but how can i exit that mode?

    – V. Dalechin
    Jan 19 at 9:37











  • Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

    – V. Dalechin
    Jan 19 at 9:43











  • Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

    – danzel
    Jan 19 at 9:43











  • @V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:43











  • @SergiyKolodyazhnyy Thanks for clearing that up!

    – V. Dalechin
    Jan 19 at 9:47
















2














The command prompt format is stored in the PS1 environment variable. If you set it to the empty string, no command prompt will be displayed. You can then clear the console:





user@host:$ PS1=
clear


If you need to restore it afterwards, you can save the initial value in a different variable first:



user@host:$ PS1_INITIAL=$PS1 # store the initial value
user@host:$ PS1=
PS1=$PS1_INITIAL # restore the initial value
user@host:$


Or you can source .bashrc where the original values are defined:



. ~/.bashrc
user@host:$





share|improve this answer


























  • That looks pretty much like an answer, but how can i exit that mode?

    – V. Dalechin
    Jan 19 at 9:37











  • Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

    – V. Dalechin
    Jan 19 at 9:43











  • Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

    – danzel
    Jan 19 at 9:43











  • @V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:43











  • @SergiyKolodyazhnyy Thanks for clearing that up!

    – V. Dalechin
    Jan 19 at 9:47














2












2








2







The command prompt format is stored in the PS1 environment variable. If you set it to the empty string, no command prompt will be displayed. You can then clear the console:





user@host:$ PS1=
clear


If you need to restore it afterwards, you can save the initial value in a different variable first:



user@host:$ PS1_INITIAL=$PS1 # store the initial value
user@host:$ PS1=
PS1=$PS1_INITIAL # restore the initial value
user@host:$


Or you can source .bashrc where the original values are defined:



. ~/.bashrc
user@host:$





share|improve this answer















The command prompt format is stored in the PS1 environment variable. If you set it to the empty string, no command prompt will be displayed. You can then clear the console:





user@host:$ PS1=
clear


If you need to restore it afterwards, you can save the initial value in a different variable first:



user@host:$ PS1_INITIAL=$PS1 # store the initial value
user@host:$ PS1=
PS1=$PS1_INITIAL # restore the initial value
user@host:$


Or you can source .bashrc where the original values are defined:



. ~/.bashrc
user@host:$






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 19 at 9:54









pa4080

14.1k52665




14.1k52665










answered Jan 19 at 9:28









danzeldanzel

2,047714




2,047714













  • That looks pretty much like an answer, but how can i exit that mode?

    – V. Dalechin
    Jan 19 at 9:37











  • Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

    – V. Dalechin
    Jan 19 at 9:43











  • Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

    – danzel
    Jan 19 at 9:43











  • @V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:43











  • @SergiyKolodyazhnyy Thanks for clearing that up!

    – V. Dalechin
    Jan 19 at 9:47



















  • That looks pretty much like an answer, but how can i exit that mode?

    – V. Dalechin
    Jan 19 at 9:37











  • Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

    – V. Dalechin
    Jan 19 at 9:43











  • Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

    – danzel
    Jan 19 at 9:43











  • @V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

    – Sergiy Kolodyazhnyy
    Jan 19 at 9:43











  • @SergiyKolodyazhnyy Thanks for clearing that up!

    – V. Dalechin
    Jan 19 at 9:47

















That looks pretty much like an answer, but how can i exit that mode?

– V. Dalechin
Jan 19 at 9:37





That looks pretty much like an answer, but how can i exit that mode?

– V. Dalechin
Jan 19 at 9:37













Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

– V. Dalechin
Jan 19 at 9:43





Allright, I've understood, if i want to exit that mode i have to save command prompt in another variable and restore it. Thanks.

– V. Dalechin
Jan 19 at 9:43













Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

– danzel
Jan 19 at 9:43





Close the terminal. PS1= will only set the environment variable in that specific terminal. Or set it back to the default value which you can see by running echo $PS1 in a different terminal (one that shows the default prompt).

– danzel
Jan 19 at 9:43













@V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

– Sergiy Kolodyazhnyy
Jan 19 at 9:43





@V.Dalechin It's not a mode. PS1 prompt is the text shown before the cursor. You never entered a mode. After a command clear is issued you still can type in commands, but PS1 is set to empty empty string. All you have to do is set PS1 to something again.

– Sergiy Kolodyazhnyy
Jan 19 at 9:43













@SergiyKolodyazhnyy Thanks for clearing that up!

– V. Dalechin
Jan 19 at 9:47





@SergiyKolodyazhnyy Thanks for clearing that up!

– V. Dalechin
Jan 19 at 9:47


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111080%2fhow-to-fully-clear-terminal-screen%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?