Daily Archives: 2017/07/19

Screen – terminal multiplexer in Ubuntu Server



Screen is a terminal multiplexer, which allows a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session (such as when using SSH).



The screen package can be installed on Ubuntu using any method.

Starting with the Jaunty release, the screen-profiles package (later renamed Byobu) provides advanced features such as status bars, clocks, and notifiers. The package can also be manually installed on previous Ubuntu releases.



Screen can be started by typing



in a terminal. Press Enter after reading the introductory text.

Virtual terminals in Screen can be manipulated by pressing the Ctrl+A key combination, and subsequently pressing a key to execute one of the commands given below:

  • c creates a new virtual console

  • n switches to the next available virtual console

  • p switches back to the previous virtual console

  •  lists all available virtual consoles and their assigned numbers

  • hitting a number key brings the corresponding virtual console to the foreground
  • Esc lets you scroll back and forth in your terminal output

  • d detatches the current screen sessions and brings you back to the normal terminal

When a Screen session is detached, the processes that were running inside it aren’t stopped. You can re-attach a detached session by typing

screen -r


in a terminal

To remove the annoying copyright notice at startup, edit your /etc/screenrc with

sudo nano /etc/screenrc


and remove the hash which begins the line

#startup_message off


Save the file, and you will not see it again.

For further information and more advanced commands, you can refer to the screen man page. Source: https://help.ubuntu.com/community/Screen


Install and Run Bitcoin Core and Wallet in Ubuntu Server 16.04

  1. Install Bitcoin Core:
    • $ sudo apt-add-repository ppa:bitcoin/bitcoin
    • $ sudo apt-get update
    • $ sudo apt-get install bitcoind
  2. Run Bitcoin Node:
  3. Optional: start Bitcoin node at boot:
    • Run the following command to edit your crontab:
      • $ crontab -e
    • Scroll to the bottom of the file displayed and add the following line:
      • @reboot bitcoind -daemon
    • Save the file and exit.
  4. Verify if Bitcoin node is running:
    • $ bitcoin-cli getinfo
  5. Stop Bitcoin Core/Node process:
    • $ bitcoin-cli stop
  6. Create a new wallet address:
    • $ bitcoin-cli getnewaddress               # create an address in default account
    • $ bitcoin-cli getnewaddress “John”   # create an address in John account
    • (understanding account in wallet)
  7. Show current wallet addresses:
    • $ bitcoin-cli listreceivedbyaddress 0 true      # show all address from all accounts
    • $ bitcoin-cli getaddressesbyaccount “”     # show address in default account
    • $ bitcoin-cli getaddressesbyaccount “John”   # # show address in John account

Install and Run zCash in Ubuntu Server 16.04

  1. Install zCash node (website: z.cash):
    • $ sudo apt-get install apt-transport-https
    • $ echo “deb [arch=amd64] https://apt.z.cash/ jessie main” | sudo tee /etc/apt/sources.list.d/zcash.list
    • $ sudo apt-get update
    • $ sudo apt-get install zcash
    • $ zcash-fetch-params    (# download parameters)
    • $ cd .zcash
    • $ nano zcash.conf    (create file: zcash.conf)
    • Add following line into zcash.conf, then save and exit:
      • addnode=mainnet.z.cash     (# connect to zcash main network)
        rpcuser=user-name     (# user, no matter)
        rpcpassword= password-text  (# anything, no matter)
        gen=0      (# value=0: not mining; value=1: mining when run zcashd)
  2. Run zcash core (zcashd):
    • $ zcashd    :   run zcashd in normal mode and showing running info.
    • $ zcashd –daemon  :   run zcashd in background
    • It will take several hours to download all blockchain to local server.
  3. Use zcash client app (zcash-cli):
    • To check if zcashd is running:
    • Create new t-Address (account for wallet is not supported yet – 2017/07):
      • $ zcash-cli getnewaddress
    • List t-address:
      • zcash-cli getaddressesbyaccount “”  (# show address of default account)
      • zcash-cli listreceivedbyaddress 0 true  (# show all addresses of all accounts)
    • Create new z-address:
      • $ zcash-cli z_getnewaddress
    • List z-address:
      • $ zcash-cli z_listaddresses