{"id":1492,"date":"2019-08-02T16:47:47","date_gmt":"2019-08-02T23:47:47","guid":{"rendered":"https:\/\/doubleecpu.com\/?page_id=1492"},"modified":"2019-10-06T02:36:26","modified_gmt":"2019-10-06T09:36:26","slug":"linux-commands-raspbian","status":"publish","type":"page","link":"https:\/\/doubleecpu.com\/index.php\/raspian-linux-programs\/linux-commands-raspbian\/","title":{"rendered":"Linux Commands Raspbian"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">whoami<\/h3>\n\n\n\n<p>The whoami command will display the current user account name of the logged in user.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">echo <\/h3>\n\n\n\n<p>the echo command can be used to display information on output . Output can be set to the command line, stdout, stdin, or pip to another command<\/p>\n\n\n\n<p>&#8212;insert pic&#8211; <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">pwd<\/h3>\n\n\n\n<p>The pwd will display the present working directory, which is the relative path of the directory where commands will be run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">cd<\/h3>\n\n\n\n<p>change directory command is used to change the directory location.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">su<\/h3>\n\n\n\n<p>Switch user command to switch between user accounts<br>using the &#8211; (minus) is used to change to the root user. The password prompt will appear when switching into another user account. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exit<\/h3>\n\n\n\n<p>The exit command will will logout of the current user. If su was used will return to the user that was previously logged in until no user at which time it will log out of linux.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">hostname<\/h3>\n\n\n\n<p>the hostname  command  will retrieve the hostname in raspian, which by default is [raspberrypi].<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"61\" src=\"https:\/\/doubleecpu.com\/wp-content\/uploads\/2019\/10\/Linuc_Command_hostname.png\" alt=\"\" class=\"wp-image-1827\"\/><\/figure>\n\n\n\n<p> this can be changed by typing the desired name after hostname command.<\/p>\n\n\n\n<p>hostnamectl<\/p>\n\n\n\n<p> echo NodePiZero &gt; hostname <\/p>\n\n\n\n<p> cat \/etc\/hostname <\/p>\n\n\n\n<p>Close terminal window and open and the new hostname should appear<\/p>\n\n\n\n<p>&#8212;insert pic&#8212;<\/p>\n\n\n\n<p>To add the hostname to other computers the name will need to be added to the hostfile or if available DNS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Hosts<\/h3>\n\n\n\n<p>The hosts file can be found <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"> X-Server<\/h3>\n\n\n\n<p>To get the Version:<br>Xorg &#8211; version<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1323\" height=\"408\" src=\"https:\/\/doubleecpu.com\/wp-content\/uploads\/2019\/09\/Xorg-version.png\" alt=\"\" class=\"wp-image-1770\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"> GNOME<\/h3>\n\n\n\n<p>GNOME 3 version is stored in this file:<br>\/usr\/share\/gnome\/gnome-version.xml<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"245\" src=\"https:\/\/doubleecpu.com\/wp-content\/uploads\/2019\/09\/GNOME_version.png\" alt=\"\" class=\"wp-image-1771\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Package Installation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"> Compiling Software From Source<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"> Tarball<\/h4>\n\n\n\n<p>To uncompress file use the tar command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -xzvf filename.tar.gz -C \/[Directory\/Path]<\/pre>\n\n\n\n<p>The file may include a setup script file, Look for  \/[Directory\/Path]\/bin\/somescript.sh <br>The file should include any steps required for setup such as  making directories and  compiling any uncompressed code to binaries . <br>Example: Installing <a href=\"https:\/\/doubleecpu.com\/index.php\/jira-on-rasbian\/\">Jira on Raspian<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"> Repositories <\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"> apt-get<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"> apt-cache <\/h4>\n\n\n\n<h2 class=\"wp-block-heading\">Server\/Configuration Management<\/h2>\n\n\n\n<p> -Puppet<br> -Chef<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Files<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">touch<\/h3>\n\n\n\n<p>the touch command can be used to create files<\/p>\n\n\n\n<p>mkdir<\/p>\n\n\n\n<p>make directory command will create a new directory, either relative to pwd or in declared absolute path. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ls<\/h3>\n\n\n\n<p>List command will display a list of files and directories. The command can list relative or absolute directory information. <\/p>\n\n\n\n<p>&#8212; insert pic&#8212;<\/p>\n\n\n\n<p>it can display as a list matrix or column directory information.<\/p>\n\n\n\n<p>&#8212; insert pic &#8212; <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">chmod<\/h3>\n\n\n\n<p>change modes command allows modification of how files and directories are accessed.<\/p>\n\n\n\n<p>&#8212;insert pic of permissions &#8212;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">chown<\/h3>\n\n\n\n<p>change owner command allows the user that owns a file to be changed. <br>chown new_user_owner file_name<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">chgrp<\/h3>\n\n\n\n<p> change group command allows the group that owns a file to be changed. <br>chgrp new_group_name_assigned file_name <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">useradd<\/h3>\n\n\n\n<p>add new user command can be used to add new users <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">groupadd<\/h3>\n\n\n\n<p>Add new group command used to add new groups<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">setfacl<\/h3>\n\n\n\n<p> setfacl -m u:susie:rw file3 <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">getfacl<\/h3>\n\n\n\n<p>umask<\/p>\n\n\n\n<p>used to determine default permissions when not exclusively declared when creating files or directories.<br>default is 022 , this is subtracted from 666 to get permission settings.<br>can be changed <\/p>\n","protected":false},"excerpt":{"rendered":"<p>whoami The whoami command will display the current user account name of the logged in user. echo the echo command can be used to display information on output . Output can be set to the command line, stdout, stdin, or pip to another command &#8212;insert pic&#8211; pwd The pwd will display the present working directory, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/doubleecpu.com\/index.php\/raspian-linux-programs\/linux-commands-raspbian\/\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Linux Commands Raspbian&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":261,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1492","page","type-page","status-publish","hentry"],"featured_media_urls":[],"_links":{"self":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/1492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/comments?post=1492"}],"version-history":[{"count":0,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/1492\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/pages\/261"}],"wp:attachment":[{"href":"https:\/\/doubleecpu.com\/index.php\/wp-json\/wp\/v2\/media?parent=1492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}