Академический Документы
Профессиональный Документы
Культура Документы
Print screen
- Use Ubuntu Unity feature
+ press PrintScreen key to capture the whole screen
+ press alt-printscreen to capture the current active window
- Use Screenshot app
+ Search for “screenshot”
→ can specify delay time before it takes a pic
- Install additional program: “Shutter”
Trash folder
- The trash folder is found at: /home/username/.local/share/Trash
- If you deleted something as root (e.g. deleted a file using Nautilus invoked via gksu), it's at:
/root/.local/share/Trash
- Folder which contains deleted files is /home/username/.local/share/Trash/files
Ubuntu 12.04
- system tools / system settings / details
All Ubuntu
- Use the command:
+ lsb_release -a
If that command doesn't work, try this:
• cat /etc/lsb-release (lsb: linux standard base)
Error Reporting
Editing a file
$ sudo vi /etc/default/apport
Change enabled=0 to enabled=1 so that Ubuntu will report errors (enabled=1 is the default value)
Using GUI
System settings / privacy / diagnostics – check or uncheck “send error reports to canonical”
Keyboard Shortcuts
Useful shortcuts
ctrl + alt + del: logout
ctrl + alt + L: lock
ctrl + alt + t : open a terminal
Disable animations
Install CompizConfig Settings Manager first
Open the program:
• Effects: either tick or untick animations -> enable/disable the whole animation setting
• Select animation to customise:
◦ minimize animation -> enter 50 (minimum value)
◦ open animation (when opening an app): glide 2 -> enter 50
◦ unminimize animation -> 50
◦ close animation -> 50
Ubuntu battery
Open dconf-editor
Browse to org -> gnome -> settings-daemon -> plugins -> power
Ubuntu system
System Monitor
- system tools / system monitor (or $gnome-system-monitor)
- system tools / task manager
System settings
Date and time
(1,31)
Software clock – Hardware clock
Appearance
Automatically Hide Unity Launcher
- In Ubuntu 12.04:
+ Click the button at top right corner / system settings / appearance
+ Choose behavior tab, click the button to turn it on
Tweak app menus
In Ubuntu 16.04:
• choose where app menus appear:
◦ Go to System Settings > Appearance
◦ Select the Behavior tab
◦ Find the section headed: Show the Menus for a Window
◦ Check (click) the circle next to In the windows title bar
• To make application menus "always show":
◦ Go to System Settings > Appearance
◦ Select the Behavior tab
◦ Find the section headed: Menus visibility
◦ Check (click) the circle next to Always displayed
Move the Unity launcher
Ubuntu 16.04:
• To move the Unity Launcher to the bottom:
◦ gsettings set com.canonical.Unity.Launcher launcher-position Bottom
Text Entry
check or uncheck "show current input source in the menu bar" (similar to language bar on windows
system)
System configuration
Dconf-editor vs gconf-editor
• dconf is a new way for applications to store settings, and it is intended to replace gconf.
System startup
Boot arguments
Cat /proc/cmdline
Run level
Check previous and current runlevel:
# runlevel
Services
- init process is in /sbin/init. It manages jobs defined in /etc/init/ directory:
+ gdm.conf
+ lightdm.conf
+ shutdown.conf
- Some of the ways to enable/disable services:
+ Terminal
+ GNOME GUI
Terminal
1. Using update-rc.d : install & remove System-V style init script
(I think this is the old way although I haven't verified this yet)
2. Pass a script file start/stop/restart: this will start/stop services temporarily
$ sudo /etc/init.d/xinetd status
When we run that command, it says “Rather than invoking init scripts through /etc/init.d, use
the service(8) utility, e.g. service xinetd status
Since the script you are attempting to invoke has been converted to an Upstart job, you may
also use the status(8) utility, e.g. status xinetd”
GUI tools
Startup applications
- We can either run this command on a terminal to start the GUI,
$ gnome-session-properties
(this tool is of GNOME project)
OR Applications/System Tools/Preferences/Startup Applications
(note that not all services appear here, commonly only the ones that involve a system tray icon or GUI
windows)
Boot up manager
- Install boot up manager:
+ sudo apt-get install bum
- Run bum (it has to be run as root):
+ sudo bum
(I think this one doesn't work very well)
References
http://upstart.ubuntu.com/cookbook/ (upstart cookbook)
Linux Kernel
Device Driver
Installing
Method 1
The following instructions will help to install NVIDIA Geforce Driver for this HP laptop
- Download the file “NVIDIA-Linux-x86-xxx.x.run” from NVIDIA website
- Press ctrl-alt-F1 to go to the console
- Stop X server temporarily:
# sudo stop lightdm
(OR #sudo service lightdm stop )
- Get to the directory containing the file, and type (as root):
# sudo sh ./ NVIDIA-Linux-x86-xxx.x.run
- During installation process, NVIDIA will create a backup of X server configuration.
- After the installation is finished, restart the computer:
# shutdown -r now
- After restarting, if windows can't login to GUI interface (perhaps the error is “API error: versions
mismatch”), we can uninstall NVIDIA driver by:
# sudo ./NVIDIA-Linux-x86-xxx.x.run - -uninstall
→ NVIDIA will automatically restore the previously backup file
Method 2
- We can also install from a 3rd-party source by opening the terminal:
# sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
# sudo apt-get update
# sudo apt-get install nvidia-current
(x-swat means “stable drivers”)
- Homepage is here:
https://launchpad.net/ubuntu/+ppas
(PPA stands for Personal Package Archives)
- A ppa is a package bundle provided by 3rd party (meaning any other than Ubuntu official). Adding a
ppa and installing an app/driver from it means you will be receiving updates for them when the ppa
owner updates a page
Checking
- If the installation is successful, we can check NVIDIA X Server setting by searching for “NVIDIA X
Server Settings”
- OR, check by running this command
# glxinfo | grep OpenGL
- For Ubuntu 14.04, check which driver is being used for X:
• lspci -vnn | grep -i VGA -A 12
Managing Software
Using dpkg
Using apt-get
- apt-get help
- sudo apt-get remove application
+ The package is removed whereas the configuration files are left intact
- sudo apt-get purge application
+ The package & also the configuration files are remove
- sudo apt-get remove --purge application
+ same as “sudo apt-get purge application”
- sudo apt-get autoremove
- sudo apt-get update
+ The APT package index is essentially a database of available packages from the repositories
defined in the /etc/apt/sources.list file. Use this command to update the local package index
with the latest changes made in repositories
- apt-get actions are logged at /var/log/dpkg.log
Using apt-cache
- used to search for an app
$ apt-cache search dropbox
Using aptitude
(1,25)
Same as apt-get, but …
Command line
$ sudo apt-get update
$ sudo apt-get upgrade || $ sudo apt-get dist-upgrade
Differences bet $sudo apt-get upgrade & $sudo apt-get dist-upgrade (check man page or in (1,25))
GUI
- Run “Update Manager”
- Then, check for update
GUI
- Run “Update Manager” / settings / updates tab
- At “notify me of a new Ubuntu version”, we have some choices:
+ For any new versions
+ For LTS versions
+ Never
- If we choose “For any new versions”, then we can upgrade the system to a newer one even though
that version is not a LTS version.
- A guest session is a user account which can log on to the Ubuntu system without the need to enter
password information. To secure the system, we need to disable this.
- sudo gedit /etc/lightdm/lightdm.conf
- add this line at the end, below "user-session=ubuntu"
allow-guest = false
→ guest can't log on to the system anymore
File system
Check the partition table:
# sudo fdisk -l
Display Manager
- Ubuntu 11.10 introduces a new display manager, so we need to configure this file:
+ vi /etc/lightdm/lightdm.conf
- How to restart the display manager (without rebooting):
+ sudo restart lightdm
+ sudo service lightdm restart
X configuration file
X configuration file location:
• /etc/X11/xorg.conf
Networking
Interfaces
https://help.ubuntu.com/10.04/serverguide/network-configuration.html
Telnet
SSH
- Install SSH:
+ sudo apt-get install openssh-server
- SSH server:
+ Configuration file for SSH server:
* /etc/ssh/sshd_config
+ SSH service:
* sudo service ssh status/start/stop/restart
- SSH client:
+ Configuration file for SSH client:
* /etc/ssh/ssh_config
FIREWALL
https://help.ubuntu.com/12.04/serverguide/firewall.html
https://wiki.ubuntu.com/UncomplicatedFirewall
- Ubuntu built-in firewall is ufw (uncomplicated firewall)
- By default ufw is disabled
- Commands to work with:
+ sudo ufw disable
+ sudo ufw enable
+ sudo ufw status
Troubleshooting
General
(1,20)
dmesg or /var/log/messages
REFERENCES
1. Ubuntu Unleased (2012 edition)
2.