查看: 1593|回复: 0

[教程] 【一网打尽】Raspberry Pi Course Week 1 – Day 5.0 (The Desktop)

[复制链接]
  • TA的每日心情
    开心
    2016-8-4 10:56
  • 签到天数: 242 天

    连续签到: 1 天

    [LV.8]以坛为家I

    发表于 2015-3-27 15:08:20 | 显示全部楼层 |阅读模式
    分享到:

    In the previous module you connected your Raspberry Pi together except for the power supply.  Plug  in the power supply.  Make sure you use at least a 700mA 5V power supply.  This is the same type of power adapter that is used with some Samsung phones.

    When the Raspberry Pi has booted up you will need to login using the correct user name and password.  Enter pifor the login and raspberry for the password.

    You are presented with a black screen and a prompt.  This prompt is waiting for a command from a user.  Remember in the previous discussion on operating systems and the simplistic view of how they function?  Well the operating system can now accept a command from an external input, in this case the keyboard and process that information to display a result.

    Go ahead and enter the following.

    ls

    The output will display a list of files because the ls command is understood by the operating system.  The next command will restart the Raspberry Pi.

    Enter

    reboot

    After a few minutes the Raspberry Pi will reboot and you will be back at the command line prompt.  Log back in by entering your login name and password.

    The next command will start the desktop.  Enter the following command.

    startx

    raspberry-pi-desktop-lxde.png

    The desktop will appear but the screenshot above may appear different.

    The desktop will be explored later but for now you will shut down the Raspberry Pi from the desktop.  Click your left mouse button on the red power button at the bottom of the desktop.

    From here you can Logoff, reboot or shut down the Raspberry Pi.

    Click on the reboot button.

    Log back in and enter the following command.

    sudo shutdown -r 0

    This command will also reboot the Raspberry Pi by performing the same command as the reboot command.  Sudo is a command that allows a regular user to perform administrative commands, also known as root or admin.  The reason sudo is used is because it can be used to safeguard users from causing problems to the system.  For example you would not want to accidentally remove all the files from the operating system and to have the system rendered useless.

    Shutdown is the command and -r is a flag which is used by the shutdown command.  In this case the -r means reboot.  0 is the time in minutes before the shutdown occurs.

    When the Raspberry Pi has rebooted, log back into the Raspberry Pi and enter the following command.

    sudo shutdown -r 10 “I am going to reboot the Raspberry Pi”

    This will reboot the Raspberry Pi after 10 minutes but this time it will display a message.

    Enter this command.

    sudo shutdown -h 30

    Again the sudo command is used because this is a privileged command but the -h is a flag and in this case means halt.  This is going to stop the system from rebooting and will shut down the Raspberry Pi completely.  The number 30 means that in 30 minutes time the system will shut down.


    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-6-3 10:58 , Processed in 0.110233 second(s), 16 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.