Member Avatar for Nathan_6

Hi everyone.

I downloaded ubuntu server into a virtual machine on my mac so I can learn unix/linux.

When I type commands it sometimes prints many pages worth of information, but the virtual machine does not allow me to scroll upwards (either with my mouse or with my arrow keys) to see what was printed towards the beginning of the command's output. Instead, when I use my up and down arrow keys, the terminal suggests various commands that I issued in the past.

Could anyone please help me figure out how to configure the virtual machine to fix the problem?

Thanks in advance!

Recommended Answers

All 5 Replies

What I usually do is to install the tmux terminal multiplexer. Type

sudo apt-get install tmux

in the server terminal, then save this minimal configuration file in $HOME/.tmux.conf

# These 3 lines define the prefix F1 pour tmux instead of C-b
unbind-key C-b
set -g prefix 'F1'
bind-key 'F1' send-prefix
bind-key 'F2' copy-mode
bind-key 'F3' paste-buffer

# the vi command mode
set-window-option -g mode-keys vi

# In copy mode (after pressing F2), pressing 'v' begins selection,
# pressing y finishes selection
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

# The following command allows to use 'F1 y' to send the selection in the clipboard buffer
# This allows to paste later in other apps
bind y run-shell -b "tmux save-buffer - | xclip -selection clipboard; tmux display-message \"Tmux buffer saved to clipboard\" "

Then type


in the terminal. You are now in a much more friendly terminal environment. To scroll up, type F1 F2, then use the arrow keys. You can then start a selection by typing v , move again with the arrow keys and type y to end the selection for example. You can also create new windows by typing F1 c and switch between windows withF1 1 for example.

Also I don't use a mac. If you're using a mac terminal with ssh to your server, it seems to met that the mac terminal should allow you to scroll.

Member Avatar for Nathan_6

I am not using a mac terminal with an ssh to the server. I am just working within the virtual machine via virtualbox

Member Avatar for Nathan_6

Can you show me how to save the minimal configuration file correctly with the needed linux commands? I am new to linux, as you can tell. Thank you.

It should be relatively easy to enable access to USB devices from the ubuntu server. In the machine configuration, activate the USB controler and the USB 2.0 controler, then add an empty filter. You may need to install first the virtualbox guest additions with

sudo apt-get install virtualbox-guest-dkms

Once the virtual machine can access a USB key, use the cp command to copy the file

cp SOURCEFILE $HOME/.tmux.conf

the source file may be something like /media/yourname/FOOBAR/myfile.conf

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.