• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to run a process in background or bring to foreground in Linux

    Running a process in background

    What if you a script which takes more than 24 hours to run so in those cases it is not a good idea to run them on putty as in any case of connection failure your putty would stop working making you run the script again. In those cases you can run the process on background manually as shown below

    For example:
    Run the firefox using below parameter
    # firefox & 

    As you can see the firefox opened up on the background without occupying your terminal in the background.

    Running a process in foreground

    In this case the terminal used for running the process will be locked and as soon as you close the terminal your running process would be terminated. This can be seen  mostly when you are running a very time taking script on a terminal.

    For example:
    Try running firefox from your terminal without using any extra parameter
    # firefox

    Now as you see your terminal is locked and unless you close the firefox browser you won't be use that terminal. It means your process is running on foreground.

    You can bring the process back to forground using the below cmd
    # fg firefox

    Follow the below links for more tutorials

    RAID levels 0, 1, 2, 3, 4, 5, 6, 0+1, 1+0 features explained in detail
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    15 tips to enhance security of your Linux machine
    How does a DNS query works when you type a URL on your browser?
    How to create password less ssh connection for multiple non-root users
    How to create user without useradd command in Linux
    How to give normal user root privileges using sudo in Linux/Unix
    How to do Ethernet/NIC bonding/teaming in Red Hat Linux
    How to install/uninstall/upgrade rpm package with/without dependencies
    Why is Linux more secure than windows and any other OS
    What is the difference between "su" and "su -" in Linux?
    How to secure boot loader (grub menu) with password in RHEL 6
    10 examples to help you understand top command usage in Unix/Linux

    Deepak Prasad

    Deepak Prasad is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    How to run a process in background or bring to foreground in Linux How to run a process in background or bring to foreground in Linux Reviewed by Deepak Prasad on Saturday, June 07, 2014 Rating: 5

    No comments:

    Powered by Blogger.