+ All Categories
Home > Documents > Ubuntu getting started

Ubuntu getting started

Date post: 12-Jul-2015
Category:
Upload: ernesto-celis
View: 98 times
Download: 1 times
Share this document with a friend
24
Ubuntu - Getting Started [email protected] This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)
Transcript
Page 1: Ubuntu getting started

Ubuntu - Getting Started

[email protected]

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 2: Ubuntu getting started

 Ubuntu - Getting Started

– Desktop– Networking– System resources and monitoring– Software management– LAMP development

                                                 

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 3: Ubuntu getting started

xubuntu

Red Hat

!=

Linux

Ubuntu

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 4: Ubuntu getting started

LinuxHardware drivers, process scheduler, file system I/O, etc...

GNU & others toolsBash shell, almost all commands and programs available

X Window SystemXorg server, basic windows libraries and tools

Window managerTwm, opendesktop, etc...

Window & Desktop managerGnome, KDE, XFCE

GNU/Linux system

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 5: Ubuntu getting started

Desktop

– Getting around

Web references:https://help.ubuntu.com/10.04/newtoubuntu/C/index.htmlhttp://library.gnome.org/users/user-guide/stable/overview.html

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 6: Ubuntu getting started

Desktop

The menubar is found at the top left of your screen and is where you go to start applications, find files and customise settings. It is made up of three menus:

– Applications - start applications and find new ones in Software Center

– Places - find files and folders on your computer– System - customise Ubuntu's settings and find help

The notification area is found in the top right hand corner of your screen and displays the status of different applications. You can use it to change the volume, change your online status in different applications, and shut down your computer.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 7: Ubuntu getting started

Desktop

Open a command line window with in Applications → Accesories → Terminal

Place a Terminal launcher in the top panel: Applications → Accesories → Right click on Terminal and select Add this laucher to panel

Launch the Terminal application using the launcher in the panel you just created and type:

sudo tail -f /var/log/syslog

Leave the window open and check it now and then to see what happens while you go trough the examples.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 8: Ubuntu getting started

Networking

– Connect to wired LAN– Connect to wireless LAN– Troubleshooting– Share files and folders with other computers 

Web references:https://help.ubuntu.com/10.04/internet/C/index.html

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 9: Ubuntu getting started

NetworkingConnecting to wired LAN

If you don't have DHCP on your network then you can configure a static connection. You will need to enter the network settings yourself, so check with your network administrator or look at your router's settings to find out which details to use.

Right click the Network Manager icon in the system notification area and select Edit Connections.

● Click the Wired tab, select the connection and click Edit.

● Click the IPv4 Settings tab and choose Manual from the Method drop down list.

● Click Add and enter your IP address and other details. Enter the address of your DNS server too.

● Click Apply. The network should now connect if you entered the settings correctly.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 10: Ubuntu getting started

NetworkingConnecting to wireless LAN

To connect to a wireless network:

– Ensure that your wireless device is turned on.– Click the Network Manager icon in the system notification area.– Under Wireless Networks click on the network you want to connect to.

If you have connected to the network previously, Ubuntu will automatically connect to the network where it is available.

If you are connecting to a network for the first time, security details may be needed. If so, a dialog box will open. Enter your security details as follows.

– In most cases the security type will be detected automatically. If not, select the security type from the Wireless Securitydrop-down box. This will depend on how the wireless network is set up. Examples of security types are WEP, WPA and LEAP.

– Enter the password, key or other authentication details as appropriate. These are usually case-sensitive. If you don't know your wireless key, it may be printed on the bottom of your wireless router.

– Click Connect. If you are prompted again for your security details, you may have entered them incorrectly, or there could be a problem with your wireless setup.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 11: Ubuntu getting started

NetworkingSharing directories

To share folders using Nautilus:

– Press Places → Computer to open a File Browser window.

– Right click the folder you wish to share and select Sharing Options on the popup menu.

– Check Share this folder in the Folder Sharing window. You may change the Share name field if you want to use a different share name.

– You may receive a message which says Sharing services are not installed. If this happens, ensure that the two checkboxes in the message box are checked and press Install services. Sharing service support will then be downloaded and installed; this may take a while.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 12: Ubuntu getting started

NetworkingSharing directories

•Select Allow other people to write in this folder if you wish to allow others to add, change, and remove files in this folder. If you leave this box unchecked, other people will only be able to view files in this folder. You may also fill in theComment field.

•Select Guest access (for people without a user account) if you wish to allow guest users to access your files.

•Press Create share to make the shared folder available.

You may receive a message stating that Nautilus needs to add some permissions to the folder in order to share it. If this happens, press Add the permissions automatically.

Other people on the same network (LAN) as you should now be able to access the folder.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 13: Ubuntu getting started

NetworkingTroubleshoting

Most of the tools in this section require use of the Terminal, Applications → Accessories →Terminal.

ifconfig is intended to allow you to change the settings of your network connections, but it can also be used to list information about the current connection.

– Type ifconfig in the Terminal and press Enter.● inet addr gives the current IP address of the connection● Mask gives the network mask● HWaddr gives the MAC address of your network device● eth0 is your first Ethernet NIC; lo is the loopback device which

always points to 127.0.0.1

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 14: Ubuntu getting started

NetworkingTroubleshoting

Type ping -c 4 google.com and check that all the ICMP packets return

Type sudo mv /etc/resolv.conf /etc/resolv.orig

Type ping -c 4 google.com Now the google.com hostname shoudn't be resolved.

Type sudo mv /etc/resolv.orig /etc/resolv.conf

Type sudo gedit /etc/resolv.conf to change DNS servers

Type route -n to check the default route.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 15: Ubuntu getting started

System resources and monitoring

– Basic commands– Disk space and memory– Running processes

Web references:

https://help.ubuntu.com/10.04/basic-commands/C/

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 16: Ubuntu getting started

System resourcesBasic commands

The pwd command outputs which directory you are currently located in (pwd stands for “print working directory”). For example, typing

pwd

will show /home/username

The ls command outputs a list of the files in the current directory. For example, typing

ls ~

will show you the files that are in your home directory.

The mkdir command allows you to create directories. For example, typing:

mkdir mi\ dir

Will create the directory “mi dir” in you home directory.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 17: Ubuntu getting started

System resourcesThe df command displays filesystem disk space usage for all partitions.

df -h

will give information using megabytes (M) and gigabytes (G) instead of blocks (-h means "human-readable").

The free command displays the amount of free and used memory in the system.

free -m

will give the information using megabytes, which is probably most useful for current computers.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 18: Ubuntu getting started

System resourcesThe top command displays information on your GNU/Linux system, running processes and system resources, including CPU, RAM & swap usage and total number of tasks being run. To exit top, press q.

top

Type h from within top to see the help.

The ps command reports a current snapshot of the running processes.

ps

ps -a ← Snapshot of ALL processes

ps -auw ← Snapshot of ALL processes associated with a system user.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 19: Ubuntu getting started

System resourcesType ps -au | less

Pipes the output from ps to less, to be able to paginate the output.

Type ps -au | grep root

Pipes the output from ps to grep, to be able to filter the output to show only processes owned by the root user. Grep accepts regular expressions as parameters.

Execute commands with elevated privileges:

sudo adduser newuser

The sudo command allows to run other commands with elevated privileges. In this case, the adduser command is restricted only to root.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 20: Ubuntu getting started

Software management

– Using Synaptics package manager– Compressed binaries– Building from source

Web references:https://help.ubuntu.com/10.04/add-applications/C/index.html

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 21: Ubuntu getting started

Software managementUsing Synaptic Package Manager

Synaptic can be used to manage advanced software packages (such as server applications) which Software Center does not manage.

– Click System → Administration → Synaptic Package Manager. Enter your password if prompted.

– Click Search to search for an application, or click Sections and look through the categories to find one.

– Right-click the application that you want to install and select Mark for Installation.

– If you are asked if you would like to mark additional changes, click Mark.

– Select any other applications that you would like to install.

– Click Apply, and then click Apply in the window that appears. The applications that you chose will be downloaded and installed.

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 22: Ubuntu getting started

Software managementInstall precompiled binaries

Unpack the firefox package by typing:

tar -xvjf ~/firefox-4.0b7.tar.bz2

Change working directory to ~/firefox and check that the firefox binary and supporting files have been created.

cd firefox && ls

Modify the value of the $PATH shell environment variable to be able to run firefox from anywhere in the file system.

export PATH=/home/username/firefox:$PATH

Type firefox

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 23: Ubuntu getting started

Software managementBuilding source codetar -xvzf xbill-2.1.tar.gz

cd xbill-2.1

gcc -I. -c Bill.c -o Bill.o

You should something like this in order to build the game:

gcc -g -O2 -o xbill Bill.o Bucket.o Cable.o Computer.o Game.o Horde.o Network.o OS.o Scorelist.o Spark.o UI.o util.o x11-motif.o x11-athena.o x11.o gtk.o -L/usr/lib64 -lXm -lXaw3d -lXmu -lXt -lX11 -L/usr/lib64 -L/usr/lib64 -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm -lSM -lIC

GCC stands for GNU C Compiler

Instead try typing this:

./configure

make

sudo make install

xbill

This document is available under Creative Commons ShareAlike 3.0 License (CC-BY-SA)

Page 24: Ubuntu getting started

Recommended