LinkIt Smart Duo: Useful Linux commands (part 1)

The objective of this post is to list some useful Linux commands that can be sent on the LinkIt Smart operating system.


The objective of this post is to list some useful commands that can be sent to the LinkIt Smart operating system, the OpenWrt. It includes some practical example use cases to test them in the device.

Most of these commands will be familiar to all who have worked with other distributions of the Linux Operating System.

List of commands

  • ls
  • pwd
  • cd
  • clear
  • uname

ls command

The ls (list) command lists the directory contents. So, it’s a very basic and usefully command that anyone working with Linux systems should know.

We will be seeing some examples using this command bellow. You can check the many command line options this command can take here.


pwd command

The pwd (print working directory) command prints the current directory where the user is located.

Figure 1 exemplifies the use of this command. First, I sent the command from the root directory (the default one when connecting via Putty) and then I moved to another directory using the cd command and issued the pwd,  which printed the new directory.


Figure 1 – pwd command.

cd command

The cd (change directory) command is used to change the current directory [1].

Typing just the cd command will return us to the home directory [2]. In the case of the LinkIt Smart, we will return to the same directory we go when connecting via SSH using Putty.

If we type cd .. then we will move one directory up from where we are [2] or, in other words, we will change to the parent directory that contains the directory where we currently are.

From the current directory, if we type cd directoryName we will move to that directory, as long as it is contained in the current directory. This is called a relative path [2]. We can check child directories of the current directory using the ls command.

We can also navigate using the cd command and absolute paths. To to so, we just type cd /rootDirectory/someDirectory/anotherDirectory and the directory will be changed accordingly. An absolute path always starts with “/” [2].

To test these commands, just connect to the LinkIt Smart using Putty. From there, send the two following commands:

cd ..

If you haven’t yet changed the folders of your LinkIt Smart, you should see something similar to figure 2.


Figure 2 – “/” directory of the LinkIt Smart.

In this case, let’s navigate to the IoT directory to check its contents. Just type the following:

cd IoT

You should now see an examples folder inside this directory. Move to that folder and check its contents:

cd examples

You should see 3 different files with sample code, as shown in figure 3.

Linkit Smart Examples folder.png

Figure 3 – Examples folder contents.

Now, to go back to the home directory, just type the cd command:


After this command, you should be located in the same directory you were when established the connection to the LinkIt Smart. From there, you can simply go back to the examples directory using its absolute path:

cd /IoT/examples

You can check some more cd command use cases here.


clear command

The clear command is a very useful command that cleans the contents of the screen [3].

To test the command, just type the following, with some content on you command line:


You can check in figure 4 the command line before sending the clear command and after.



Figure 4 – clear command.

uname command

The uname command prints information about the current system [4]. The type of information printed will depend on the options passed to the command. A list of usefull options is shown bellow:

-n: Network node name

-s: Kernel name

-m: Machine hardware name

-p: Processor type

-o: Operating system

Figure 5 shows the result of running the uname command on the LinkIt Smart with the options listed. You can check more options for the command here. You can also use the -a option to print all the available information.


Figure 5 – uname command with multiple options.

Related content







Leave a Reply