These are some of the very basic linux commands to use in the terminal. There for real beginners just to start you off with some simple commands for the raspberry pi. Unless you are using the terminal as a root user most commands will require the word sudo before eg (sudo raspi-config).
The first thing to do is open the terminal google that for your OS its easy to find out. Once terminal open you need to log into the raspberry pi this is done with ssh command.
The default password is raspberry once entered a security warning may appear in terminal just type y and enter password.
The first thing to do is run the command
This will bring up this screen.
From this screen i recommend you change your password & expand your memory card you can do other things get the update overclock etc look around. Once the changes I've recommended are made restart the raspberry pi with.
If you're not using a computer and start your pi through your tv HDMI this screen will come on on the first time boot so have a keyboard handy.
The first 2 commands to run will update your OS always run after new install updates OS to latest version.
sudo apt-get update
sudo apt-get upgrade
This code allows you to set or change a password for users. It can be used for any user eg sudo passwd pi.
sudo passwd root
This is handy if you like messing with your raspberry pi settings programmes etc wiping your sd reinstalling the OS playing a lot (I DO) you will get a message saying key untrusted enter this code to clear ssh keys to allow reinstalled OS to run. Its a security thing.
echo "" > .ssh/known_hosts
This allows you to go into the root user if you havent set a password then your default sign in password is used.
This allows you to view all the device addresses for wireless ethernet usb etc.
This is to shutdown or restart your device.
sudo halt or sudo reboot
This is to view your devices hard drives.
If you want to have a VNC (virtual network connection) which is basically mirroring the desktop from the pi to you chosen VNC viewer install this. Then google vnc for windows mac and download a vcn recommended software for your OS
sudo apt-get install xrdp
This is to find a file.
find / -name home.php Find specefic file
find / -name *.jpg Find all jpgs
find / -name home.* Find all files with name
This is to display and edit text files.
This is to display but not edit text files.
sudo cat /etc/apache2/apache2.conf
This can be used to change file permissions when editing files on my site some have different permissions so i have to change them. Be carefull what permissions you give what files eg a comment page needs permission to write where as a simple webpage needs only view permission
chmod 0770 /var/www