Ubuntu Lab Exercises IF A COMMAND DOES NOT RUN CORRECTLY, PLEASE TRY AND RUN IT WITH SUDO. Example: % tcpdump (probably won't work, so...) % sudo tcpdump To Quit -- The Root User % sudo tcpdump % sudo -s % tcpdump What's is the second command doing? _________________________________ -- Add a User % sudo adduser --shell /bin/bash yourusername ... Press ENTER for Defaults Pick a Password That You Don't Use Somewhere Else -- Put the User in the sudo group sudo usermod -G adm yourusername Logout of the X-Windows Display, then see if you can login as your user. Did it work? ________________________________ While logged in, can you sudo? _______________________________________ -- Updates Through the GUI Find the "Update Manager" Icon in the Upper Right of Screen: Are there any Pending Updates? _______________________________________ Find the "Software Sources" Manager: How often are Updates Checked For? ___________________________________ Do Updates Happen Automatically, or do they Just Download?____________ -- Package Installation % apt-cache search sysv-rc-conf % apt-get install sysv-rc-conf % dpkg -l sysv-rc-conf % dpkg -L sysv-rc-conf What's the difference between "-l" and "-L" to dpkg? ________________ See also: man apt, apt-get, apt-cache, dpkg -- Locate Database Updates % locate sysv-rc-conf % sudo updatedb % locate sysv-rc-conf Did %locate return a better result? __________________________________ -- Services, Activate/Deactivate/Start/Stop % sudo ps -ef | grep cups % ls /etc/init.d/cups* % sudo /etc/init.d/cupsys stop % sudo ps -ef | grep cups Can you start/stop services with sysv-rc-conf? _______________________ -- Running Applications Some Commands To See What is Running % ps -ef % ps -eflw How are these different?_______________________________________________ % pstree % top ( press "q" to quit ) % lsof What is this command showing you? _____________________________________