Showing posts with label background. Show all posts
Showing posts with label background. Show all posts

Linux: How to remove directory / folder background color in terminal ?

Hello Everyone,

I moved to Ubuntu Linux recently from Arch Linux. I observed that my battery ( Lenovo Thinkpad E Series 3rd Gen) health getting low by using Arch Linux and there were some posts on that issue.

Though Arch Linux is great, I dont want to loose my $1000 laptop battery as I invested extra bucks especially for battery with extra capacity.

Any way, as I am using dual boot with Windows and Linux, I do have NTFS partitions.

As per color scheme of the terminal, if you list the items in the NTFS mount in terminal, they all come up with an ugly look as below


 so as you can see it, its completely not good.

So upon searching I came across below solution via Stackoverflow

If you are using zsh then open file ~/.zshrc, if bash then ~/.bashrc and paste following code at the end, save and exit from the file. Once exited, execute exec $SHELL  command, and it equal to source ~/.zshrc or source ~/.bashrc

eval "$(dircolors -p | \
   sed 's/ 4[0-9];/ 01;/; s/;4[0-9];/;01;/g; s/;4[0-9] /;01 /' | \
   dircolors /dev/stdin)"

So after applying the changes, my terminal output is clear as below

Hope it helps you.


Thank you.


Suspended Jobs vs Running jobs in Linux

Background Job : A job which is running background in the same shell. You can use bg command to see any background jobs.
Foreground job : A Job which is running in the same shell right before your eyes.
Suspended Job : Its a stopped/pause job but you can resume their running.
Let me explain with example very clealy
virt00# sleep 180
^Z
zsh: suspended  sleep 180
virt00# jobs
[1]  + suspended  sleep 180
virt00# bg
[1]  + continued  sleep 180
virt00# fg
[1]  + running    sleep 180
^Z
zsh: suspended  sleep 180
virt00# jobs
[1]  + suspended  sleep 180
virt00#
I have started a Job named sleep 180 then I stopped with CTRL+Z . right now my job is in suspended mode.
I see it by typing jobs command. Now I want to resume its running in background so I typed bgcommand then it will move from suspended state to running state but in background it will run.
now I typed command fg to bring it foreground , now job wont get stepped but it will pull from background jobs queue and push into foreground jobs queue.
So yes background jobs and foreground jobs always are in running state.