Arch Setup: Difference between revisions
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
=Pacman (apt for Arch Linux)= | =Pacman (apt for Arch Linux)= | ||
So here are the commands for pacman | So here are the commands for pacman | ||
==Documentation== | |||
Pacan by default removes the documentation and various other parts of a package. Make sure you adjust /etc/pacman.conf | |||
==Install== | ==Install== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 21: | Line 23: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
pacman -Qe | pacman -Qe | ||
</syntaxhighlight> | |||
===List Package dependencies=== | |||
<syntaxhighlight lang="bash"> | |||
pacman -Sii package_name | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==Purge== | ==Purge== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
pacman -Rns | pacman -Rns package_name | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 44: | Line 50: | ||
# Install openssh etc... | # Install openssh etc... | ||
RUN pacman -S --noconfirm openssh which | RUN pacman -S --noconfirm openssh which | ||
# Make service directory | # Make service directory |
Latest revision as of 11:12, 5 July 2021
Introduction
This page is about providing information around setting up Arch Linux. I have chosen to use this as opposed to Ubuntu because it is a lot smaller and seems to be a popular choice
Pacman (apt for Arch Linux)
So here are the commands for pacman
Documentation
Pacan by default removes the documentation and various other parts of a package. Make sure you adjust /etc/pacman.conf
Install
pacman -S package_name1 package_name1
Remove
pacman -R package_name
List
List contents of Package
pacman -Ql package_name
List installed Packages
pacman -Qe
List Package dependencies
pacman -Sii package_name
Purge
pacman -Rns package_name
Search
pacman -Ss package_name
Docker File
This is my base Docker for Archlinux
FROM archlinux:latest
LABEL org.opencontainers.image.authors="iwiseman@bibble.co.nz"
# Update the repositories
RUN pacman -Sy --noconfirm
# Install openssh etc...
RUN pacman -S --noconfirm openssh which
# Make service directory
RUN mkdir -p /var/run/sshd
# Change root password
RUN echo "root:root" | chpasswd
# Generate host keys
RUN /usr/bin/ssh-keygen -A
# Fix sshd
RUN sed -i 's/#\?PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config
# Expose tcp port
EXPOSE 22
# Run openssh daemon
CMD ["/usr/sbin/sshd", "-D"]