I know nothing, but need help please. Looking for way to change directory

I have a RPi 3. I set it up as OSMC media player. Works great, just had to copy some files to a SD card and power it up.
I now need a power button to use an IR based remote control. I need to install this script from the website:Support for RemotePi Board for Pi 4, RemotePi Board for Pi 3 B+, Pi 3, – MSL Digital Solutions

I’ve managed to figure out my IP and learned how to SSH in through my network (took an hour since I don’t know anything or what SSH means).

I entered the password and got to a command prompt on a program called PuTTY. Per the tutorial, I’m supposed to change directories. I’ve got the command promp: osmc@osmc:~$ but cannot get past that.
I entered:
cd/etc
cd /etc sudo nano rc.local
cd /etcsudo nano rc.local

but nothing works. It says No such file or directory no matter what I enter.
What am I doing wrong?

-bash: cd/etc: No such file or directory
osmc@osmc:~$

cd /etc
sudo nano rc.local

Here is a cheatsheet and some tutorials for how to navigate in a Linux shell: Cheatsheets and Tutorials for users new to Linux based operating systems

You’re getting there.

Before you edit rc.local though, you should let us know what you’re trying to do. The need to edit rc.local is not often warranted and as such there may be some better advice.

Sam

I’m trying to put in a shutdown script. I bought a little board to go on my RP to allow me to use a infra red TV remote control to turn it on and off.
This is the board I bought: RemotePi Board for Pi 3B and Pi 3B+ – MSL Digital Solutions

They say:
Imagine an easier, more convenient way to use your Raspberry Pi media center, simply switching it on and off with a button of your remote, removing the annoyance to unplug power connectors or having to leave it on all the time.

The RemotePi Board is an intelligent infrared remote controlled power switch add-on board specifically designed for the Raspberry Pi 3, it is mainly intended to remote control and power off/on a media center system. i.e LibreElec, OpenELEC, OSMC, XBian, RasPlex, Raspbian, etc. You do not even have to buy an additional remote !

According to their website, here are the instructions:
OSMC (tested with OSMC RC, OSMC Release 20150830)

•Default user name for OSMC is osmc, password osmc
•Key in :
•cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&
•Press ctrl+x to exit the editor, y to confirm, enter to save the file
• Key in
sudo nano irswitch.sh
• Copy and paste the following text into the editor window
#!/bin/bash

this is the GPIO pin receiving the shut-down signal

GPIOpin1=14
echo “$GPIOpin1” > /sys/class/gpio/export
echo “in” > /sys/class/gpio/gpio$GPIOpin1/direction
while true; do
sleep 1
power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
if [ $power != 0 ]; then
sudo initctl stop kodi
echo “out” > /sys/class/gpio/gpio$GPIOpin1/direction
echo “1” > /sys/class/gpio/gpio$GPIOpin1/value
sleep 3
sudo shutdown -h now
fi
done
• Press ctrl+x to exit, y to confirm, enter to save the file
• Key in
sudo chmod +x irswitch.sh
sudo shutdown –r now
•After reboot you can use the RemotePi Board to power cycle OSMC

It didn’t copy correctly:
Default user name for OSMC is osmc, password osmc
• Key in :
• cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&
•Press ctrl+x to exit the editor, y to confirm, enter to save the file
• Key in
sudo nano irswitch.sh
• Copy and paste the following text into the editor window
#!/bin/bash

this is the GPIO pin receiving the shut-down signal

GPIOpin1=14
echo “$GPIOpin1” > /sys/class/gpio/export
echo “in” > /sys/class/gpio/gpio$GPIOpin1/direction
while true; do
sleep 1
power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
if [ $power != 0 ]; then
sudo initctl stop kodi
echo “out” > /sys/class/gpio/gpio$GPIOpin1/direction
echo “1” > /sys/class/gpio/gpio$GPIOpin1/value
sleep 3
sudo shutdown -h now
fi
done
• Press ctrl+x to exit, y to confirm, enter to save the file
• Key in
sudo chmod +x irswitch.sh
sudo shutdown –r now
•After reboot you can use the RemotePi Board to power cycle OSMC

Ok, It looks like rc.local would be the best place for this.

Have you tried this yet??

Put a space after the cd and press return after each command.

The space after cd worked to get me to osmc@osmc:/etc$
Thank you.
I’m a bit confused now. do I type in cd /etcsudo nano rc.local It doesn’t do anything. I also tried cd /ect then on the next line typed sudo nano rc.local and it didn’t do anything.
I googled sudo nano and it looks like it’s a program I have to install.
Is this correct?

• Key in :
• cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&

Good day. “Have you tired this yet?” What is this…? Thanks.

Got it!
Keyed in: cd /etc
then hit enter!
then keyed in:
sudo nano rc.local
then hit enter.

A nano editor (?) popped up and I did the rest.
Thanks all for the help.