Editing Cookbook of Raspberry Pi Commands

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:
  
 
This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" '''About My Articles''' for a bit of info.  The page is only partly finished.[[Link title]]
 
This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" '''About My Articles''' for a bit of info.  The page is only partly finished.[[Link title]]
 
 
= Basic Config =
 
Also stuff in GUI
 
<pre>
 
sudo raspi-config 
 
</pre>
 
  
  
 
= Update =
 
= Update =
Commands like: not sure about the kernel one
 
<pre>
 
sudo apt-get update 
 
sudo apt-get upgrade
 
sudo apt-get install raspberrypi-kernel
 
sudo apt-get dist-upgrade
 
</pre>
 
== Change Password ==
 
 
*as shipped id is pi password is raspberry.  default user is pi , and the password is raspberry
 
*Change your password. When logged in as the pi user, you can change your password with the passwd command. Enter passwd on the command line and press Enter . You'll be prompted to enter your current password to authenticate, and then asked for a new password. 
 
I believe you can do this through the preferences in the GUI now
 
 
<pre>
 
passwd
 
</pre>
 
== fixed ip address ==
 
 
need to make sure this still works on 2018 os
 
*[https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update]
 
<pre>
 
sudo leafpad /etc/dhcpcd.conf
 
</pre>
 
 
Scroll all the way to the bottom of the file and add one, or both of the following snippets.
 
Depending on whether you want to set a static IP address for a
 
wired connection or a wireless connection eth0 = wired, wlan0 = wireless.
 
You’ll need to edit the numbers in the snippet so they match your network configuration.
 
 
*interface = This defines which network interface you are setting the configuration for.
 
*static ip_address = This is the IP address that you want to set your device to. (Make sure you leave the /24 at the end)
 
*static routers = This is the IP address of your gateway (probably the IP address or your router)
 
*static domain_name_servers = This is the IP address of your DNS (probably the IP address of your router). You can add multiple IP addresses here separated with a single space.
 
 
* my next Rasberry Pi 178/179
 
 
<pre>
 
 
interface eth0
 
 
static ip_address=192.168.0.176/24
 
static routers=192.168.0.1
 
static domain_name_servers=192.168.0.1
 
  
interface wlan0
 
 
static ip_address=192.168.0.200/24
 
static routers=192.168.0.1
 
static domain_name_servers=192.168.0.1
 
 
</pre>
 
  
 
= WiFi =
 
= WiFi =
Line 89: Line 32:
 
}
 
}
 
</pre>
 
</pre>
another file
 
<pre>
 
    sudo leafpad  /etc/network/interfaces
 
</pre>
 
Find contents like:
 
<pre>
 
# interfaces(5) file used by ifup(8) and ifdown(8)
 
  
# Please note that this file is written to be used with dhcpcd
 
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
 
  
# Include files from /etc/network/interfaces.d:
 
source-directory /etc/network/interfaces.d
 
</pre>
 
  
get your ip address
 
<pre>
 
    ifconfig
 
</pre>
 
  
= Linux Reminders =
 
  
<pre>
 
  
  
  
ls      # list files
 
sudo chmod +x /home/pi/pi3.sh    # make executable
 
  
mkdir make directory
 
rmdir – Remove Directories
 
  
[edit] Files
 
rm – Remove Files
 
  
mv – Move Files
 
~ home directory
 
./ current directory
 
../ parent directory
 
ls list files, but may miss hidden ones then ???
 
cd
 
chmod +x filename +x make executable
 
ps -e what is running ( -e all users?? without just current )
 
top info on running processes in a nano like window exit with ctrl c
 
kill end a process using pid from above
 
  
cp copy files
+
 
code
+
 
</pre>
+
 
 +
 
 +
 
 +
 
  
 
[[Category:Arduino/RaspberryPi]]
 
[[Category:Arduino/RaspberryPi]]

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)