raymate
Posts: 99
Joined: Sat Sep 28, 2013 3:56 pm
Location: Canada / UK
Contact: Website

New to Pi, how to update

Sat Sep 28, 2013 7:13 pm

Hi,

Just got my Pi yesterday and have installed Raspian with NOOB software, I purchased a kit and I think it maybe a couple of revisions behind, the NOOB was 1.2.1 but I'm unsure what Rasbian has been installed

Now I have the OS installed into my Pi is there something like "software update" (Im a Mac user) to make sure the software is up to date.

How does one go about checking the software and if indeed updates are required, how to apply them?

This little board is great, I got it for retro gaming and I think it's going to fun using it.

Many thanks

Ray
_______________________________________
Pi model B / Pi 2 / Pi 3 / Pi 4 / Pi Zero W

User avatar
JRV
Posts: 270
Joined: Mon Apr 02, 2012 1:39 pm
Location: Minneapolis, MN

Re: New to Pi, how to update

Sat Sep 28, 2013 9:39 pm

To update raspbian open a terminal and enter these commands:

Code: Select all

sudo apt-get update
sudo apt=get upgrade
The current version is dated 2013-09-25.

klricks
Posts: 7135
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: New to Pi, how to update

Sat Sep 28, 2013 9:41 pm

Do these 2 commands:
sudo apt-get update
sudo apt-get upgrade

Also a package manager such as synaptic will show you what is installed and you can search for new stuff to install etc.
sudo apt-get install synaptic
Last edited by klricks on Sun Sep 29, 2013 12:43 am, edited 1 time in total.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
jwzumwalt
Posts: 44
Joined: Sun Aug 04, 2013 4:00 pm

Re: New to Pi, how to update

Sun Sep 29, 2013 12:04 am

I have been working on my raspberry for about a week and this is my cheat sheet

System
----------------------
hostname = brain
pi, toor
root, toor

sudo shutdown -h now # shutdown
sudo reboot # reboot
ps a # show all processes
ifconfig # nic info
route # router info
sudo <prg_name> # launch prg as super user
gksudo <prg name> # root graphics program
sudo ln -s <source> <target> # soft link
update-alternatives --config x-www-browser # choose default browser


User
----------------------
sudo su # switch to super user
su <user> # switch user
sudo passwd <new_password> or passwd <user_name> <new_password> # change password
sudo useradd -m <user_name> # add user
sudo userdel <user_name> # delete user
sudo usermod -a -G <grp_name> <user_name> # add user to video group
id <user_name> # show groups assigned to user
sudo chown <user_name> <file/dir> # chnage ownership

Package managment
----------------------
sudo raspi-config # run config program
sudo dpkg-reconfigure locales # set language etc
sudo dpkg-reconfigure keyboard-configuration # set keyboard layout
sudo apt-get install console-data # copy x layout kbd to consoles
sudo dpkg-reconfigure tzdata # set time zone
sudo apt-get update && sudo apt-get upgrade # update pkg mgr & software
sudo rpi-update # upgrade firmware
sudo apt-get install <package_name> # install package
apt-get remove --purge package # remove package
apt-get clean # clean the /var
deborphan --guess-all # view orphan packages
deborphan --guess-all | xargs apt-get -y remove --purge # remove orphan packages


remote x window
----------------------
lxsession& # start xsession
sudo lxsession-edit # enable/disable autostart prg
sudo update-alternatives --config x-session-manager # change session mgr

remote ssh
----------------------
sudo service ssh status # status of ssh
ssh can be enabled/disabled from raspi-config
sudo apt-get install ssh # install ssh
sudo /etc/init.d/ssh start # start ssh
sudo update-rc.d ssh defaults # set ssh to start at boot
sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server # create new public key

C / C++
----------------------
#!/bin/bash
# personal file locations
LIB="-L./ -L./lib -L~/lib -L/lib -L/usr/lib/arm-linux-gnueabihf" # personal library files
INC="-I./ -I./lib -I~/include" # personal include files
gcc $LIB $INC -o <target> <source>

Files:
----------------------
/boot/config.txt # initial boot, cpu, video setup
/etc/group # user groups
/etc/network/inrefaces # nic setup
/etc/network/interfaces # etherenet setup
/etc/networks # ip addresses
/etc/passwd # one line per user
/etc/profile # path
/etc/xdg/lxlauncher/gtkrc # lxlauncher clr
/etc/xdg/menus/lxde-applications.menu # LXDE catagory menu
/usr/share/applications or ~/.local/share/applications # LXDE menu items
/usr/share/doc # documentation
/usr/share/icons or ~/.local/share/icons # icons
/var/www/ # localhost docroot
~/.bashrc # alias & cursor
~/.config/lxpanel/LXDE/panels # launch bar config
~/.config/pcmanfm/LXDE/pcmanfm.conf # desktop wallpaper & bkg color
~/.local/share/Trash # trash folder
~/.themes or /usr/share/themes # openbox themes

/sys/class/thermal/thermal_zone0/subsystem/thermal_zone0/temp # cpu temperature
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq # cpu frequency

klricks
Posts: 7135
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: New to Pi, how to update

Sun Sep 29, 2013 12:41 am

ednl wrote:
klricks wrote:Also a package manager such as synaptic will show you what is installed and you can search for new stuff to install etc.
Aptitude (apt-get) already is a package manager. I don't know synaptic or why it might be awesome, but this also works, first to show what's installed, second to search for new stuff:

Code: Select all

aptitude search '~i'
apt-cache search thesedroids
(or something other than thesedroids)
Forgot to mention that synaptic is a GUI.
The aptitude package manager is pre installed on Raspbian. The text based menu system is a bit cumbersome to use for me but works OK. I don't care to use command line equivalents unless I have too.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

raymate
Posts: 99
Joined: Sat Sep 28, 2013 3:56 pm
Location: Canada / UK
Contact: Website

Re: New to Pi, how to update

Sun Sep 29, 2013 1:58 pm

Thank you all for great replies. That cheat sheet is very handy.

Updated and have been able to find new stuff to install, its all very cool

Got another SD and downloaded retropi, so this is my project for this week :D
_______________________________________
Pi model B / Pi 2 / Pi 3 / Pi 4 / Pi Zero W

WacoJohn
Posts: 81
Joined: Wed May 15, 2013 9:30 pm
Location: Waco, TX USA

Re: New to Pi, how to update

Sun Sep 29, 2013 4:47 pm

my experience withAptitude is that of running it. If executed from the menu, it challenges for root p/w. Apparently, there isn't a root p/w, so at that point you are done. To prevent this, run it from terminal:

Code: Select all

su aptitude
and you will be OK.

Return to “Beginners”