After the Installation

From Manjaro-Arm
Revision as of 13:46, 7 April 2016 by Gryffyn (Talk | contribs) (Use ntpd to preserve time across reboots)

Jump to: navigation, search

Getting Started after the Installation Once you get your Manjaro-Arm installed and booted, there are a few things that you may want to do to make it more tailored to your needs. Below is a list of a few common things that you can change or configure

Overview

This section will discuss some of the common configurations that you may want to set up for using your device.

General or all editions

Using the Package Manager (CLI)

Using pacman can be a truly wonderful experience. Its simplicity is one of a kind and the power of it can be addicting for people who are not used to it. To perform a full system update

# pacman -Syyu

To install a single package

# pacman -S <packagename>

To install a group of packages

# pacman -S <package 1> <package 2> <package 3>

To search for package

# pacman -Ss <search string>

To see installed packages

# pacman -Q
or
# pacman -Q | grep <packagename>

To remove packages

# pacman -R <packagename>

There is plenty more that pacman can do however there are very good articles on that located here and here

Changing Password(s)

To change either password Root or your User (manjaro by default) simply run the passwd command as that user: As user manjaro

$ passwd

Put in the current password (manjaro is default password) press return and put in the new password. You will need to put it in twice to confirm

As Root

$ su
# passwd

And then do the same procedure as above.

Changing Username

Changing Hostname

To change the host name you simply need to edit one file as root and reboot.

$ sudo nano /etc/hostname
        put the desired hostname in place of manjaropi
        press ctrl + o to write to the file
        press ctrl + x to close

Then reboot. Once it boots you will notice the hostname has change manjaro@newhost

Configuring SSH for more security

By default ssh allows access to the root user. Generally, this is a bad idea for security. Manjaro-Arm has left this enabled to ensure that you can access your device in order to set it up. It would be safest to not allow the root user over ssh and even more to enable ssh keys.

Disabling ssh for root user

To disable the root user, edit the /etc/ssh/sshd.conf as root with your favourite editor

# nano /etc/ssh/sshd.conf

change the PermitRootLogin line to:

PermitRootLogin prohibit-password

write the file to disk and exit the editor Restart sshd by:

# systemctl restart sshd

Setting up keys

Use ntpd to preserve time across reboots

The Raspberry Pi's, along with several other SBC's (single board computers) have no RTC (real time clock). As such, when the SBC loses power, the clock on Manjaro will reset do the default. To get around this, one can use ntpd. ntpd is the Network Time Protocol Daemon, used to synchronize system time over the internet. To set it up, install the ntp package. To have the daemon start at boot, then run

# systemctl enable ntpd.service

To have the ntp update the system time at boot, probably the perferred option:

# systemctl enable ntpdate.service

To make ntp update the system time manually run:

# ntpd -u ntp:ntp

One can also have ntpd synchronize at network interface startup. To use this with netctl, add

ExecUpPost='/usr/bin/ntpd || true'
ExecDownPre='killall ntpd || true'

to the netctl profile file.

Minimal Edition

Installing Xorg and a Desktop Environment and/or a Window Manager

Setting up an FTP server for file hosting

Base Edition

Package Manager (GUI) and installing extra packages

Scaling VNC

Server Edition

Media Edition