- In order for a system to accept SSH connections the system must first be running the SSH server. By default, Ubuntu does not install the SSH server so the first step is to ensure that the server is installed. To install it run:
apt-get install openssh-server
- to install SUN Java 7 follow these instructions;
- to boot in text mode instead of graphical mode (GUI) open the /etc/default/grub file, locate the following line:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash“
and change it to:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text“
and don’t forget to run ‘update-grub’ afterwards to update. If you need the graphical interface you can still have it by simply running “startx” once logged in.
- to keep your computer’s time accurate follow these instructions;
- to add aliases system-wide you need to edit the file /etc/bash.bashrc
For example, the following aliases will add the abbreviated list long (ll) and list all (la) commands, and a useful ‘update’ command to have a comprehensive update and clean operation:
alias update='sudo apt-get update \
&& sudo apt-get upgrade -y --fix-missing \
&& sudo apt-get autoremove -y && sudo apt-get autoclean -y'
- to check whether a certain package is installed:
dpkg -l | grep packagename
- to know your IP address:
ifconfig | grep Bcast
- to know your hardware detailsand save them in an html page run:
lshw -html > your-file-name.html
(a good idea is to generate one for each of your computers and save them up for future reference)
- to make your monitor work to a resolution which hasn’t been automatically detected you can follow theseinstructions.Alternatively, you can try out this other procedure:
- run:
Xorg -configure
mv ~/xorg.conf.new /etc/X11/xorg.conf
cvt 1440 900
where 1440 and 900 are an example of the horizontal and vertical values of the desired resolution.
- copy the line of the output of cvt starting with “Modeline” and paste it into /etc/X11/xorg.conf, in the Section “Monitor”, so that it will look like:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Modeline "1440x900_60.00" 106.50 1440 1528 [...] -hsync +vsync
Option "PreferredMode" "1440x900_60.00"
EndSection
- still in the /etc/X11/xorg.conf file, find the SubSection “Display”, of the Section “Screen”, with Depth 24, and change it to:
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1440x900_60.00"
Virtual 1440 900
EndSubSection
- add a reference to the monitor identifier the Section “Screen” you have just edited:
Monitor "Monitor0"
- to disable 60 seconds delay notification when logout, shutdown and restartrun:
gconftool-2 -s '/apps/indicator-session/suppress_logout_restart_shutdown' \
--type bool true
- to add or remove a folder to the Gnome Places menu follow these instructions;
- to configure your terminal commands historyadd one or more of the following lines to your ~/.bashrc file:
- to change name of the file in which command history is saved:
export HISTFILE=
(the default value is ~/.bash_history)
- to not save in the history certain command lines add them as a colon-separated list:
export HISTIGNORE=
- to not save a line matching any other previous entry in the history:
export HISTCONTROL=ignoreboth
- to change the number of commands to remember in the command history:
export HISTSIZE=500
(the default value is 500)
- some useful command line shortcuts:
- Ctrl-D: exit from the current session;
- Ctrl-R: searching through the command history;
- Ctrl-A: moves the cursor to the beginning of the command line;
- Ctrl-E: moves the cursor to the end of the command line;
- Ctrl-W: deletes the word immediately before the cursor;
- Ctrl-K: deletes everything immediately after the cursor;
- Ctrl-Y: undo a deletion.
- to enable your printer to print to both sides of the paper (if you have a printer with this feature):
- go to System | Administration | Printing;
- double click on your printer icon;
- select ‘Installable Options’;
- check the ‘Duplex Unit’ checkbox and click the ‘Apply’ button;
- select ‘Printer Options’;
- set the ’2-sided printing’ dropdown list to ‘Flip on Long Edge (Standard)’ and click the ‘Apply’ button.
- to install your Samsung printer/scanner follow these instructions. Once you have added that repository use apt-get to install samsungmfp-data, samsungmfp-driver and samsungmfp-scanner. You will need to add users to the “lp” group to enable them to use scanning.
- to know your processor detailsrun:
cat /proc/cpuinfo | grep name
- to know the bios version of your motherboardrun:
sudo apt-get install smbios-utils
sudo smbios-sys-info
- to compare files or directories use “Meld Diff Viewer”: you can install it from Ubuntu Software Center;
- to install Microsoft’s Core Font package in Ubuntu 11.04 or lower run:
sudo aptitude install msttcorefonts
- to install Microsoft’s Core Font package in Ubuntu 11.10run:
sudo apt-get install ttf-mscorefonts-installer
- to synchronize folders, files and make backups use “Conduit Synchronizer”: you can install it from Ubuntu Software Center;
- to start terminal maximizeduse the command
gnome-terminal --geometry=200x100
where 200×100 is the dimension (in characters, not pixels): if you pick something bigger than your monitor then it will start maximized.
to start terminal in full screen use the command
gnome-terminal --full-screen
- to copy multiple files using scpuse it like showed below:
scp {file1,file2,file3} user@destination:~/
- to control your Eee PC hardware (toggle on and off WiFi and Bluetooth, configure the hotkeys, etc) download and install the latest deb of eee-control from this site;
- to move the “window management” buttons to the right corner, run:
gconftool-2 -s '/apps/metacity/general/button_layout' \
--type string ":minimize,maximize,close"
- to know which version of Ubuntu is installed on your machine run:
lsb_release -a
- to hide desktop icons for drives and partitions press Alt+F2 to bring up the Run Application dialog and type “gconf-editor”; in the left pane of the window, browse to apps->nautilus->desktop and uncheck the “volumes_visible” option;
- to change grub settings (e.g. to change your default operating system, etc) install “StartUp Manager” through Ubuntu Software Center;
- to automatically mount at boot your NTFS partitions install “Storage Device Manager” through Ubuntu Software Center (or by running sudo apt-get install -y pysdm);
- to speed up the ssh connectionrun:
sudo echo "UseDNS no" >> /etc/ssh/sshd_config
sudo /etc/init.d/ssh reload
- to know whether you need to reboota machine after updating the system via terminal check if the following file exists:
/var/run/reboot-required
- to test the speed of your hard driverun:
sudo hdparm -t /dev/sd?
- to install fonts for system-wide run:
mkdir /usr/share/fonts/truetype/myfonts
cp [fonts] /usr/share/fonts/truetype/myfonts
fc-cache -f -v
- to change the wallpaper of your login screen run:
sudo cp /usr/share/applications/gnome-appearance-properties.desktop \
/usr/share/gdm/autostart/LoginWindow
then log out and at the login screen the Appearance window will show up which will allow you to change the background. Once you have done that log back in and run:
sudo unlink \
/usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop
in order to deactivate the Appearance window upon login.
- to set up a repository cacheon your network so that once a package is downloaded from an official repository, all other machines will download it from your local area network, install apt-cacher-ng on your server machine by running:
sudo apt-get install apt-cacher-ng
then reboot your server machine. On every client create the following file:
sudo vim /etc/apt/apt.conf.d/02proxy
and paste into it:
Acquire::http { Proxy "http://your-apt-cacher-ng-server:3142"; };
- to prevent unity launcher from auto-hiding, and in general to configure Unity, follow these instructions;
- to integrate Skype icon and notifications into Ubuntu Messaging Menu follow these instructions.
- to add a new user via terminalrun:
sudo adduser username
- to add a group to a userrun:
sudo adduser username groupname
- to modify the groups of a userrun:
sudo usermod -G comma,separated,list,of,groupnames username
- to list running services run:
sudo netstat -tulpn
- to restart the x-server from the command line in Ubuntu 11.10 run:
sudo restart lightdm