Felipe's Blog

Your go-to source for Linux/Unix-like – tech – engineering.

Archive for the ‘Arch’ Category

Apply a system update on Arch Linux

without comments

To initiate an update of all installed packages, open any terminal application and pass the following command:

sudo pacman -Syu

You will be prompted for your password before the command can continue. This command checks for updates. If there are any, it will list the packages, along with their new version numbers.

log in to “sudo pacman -Syu” in a terminal

You will then be asked to confirm that you want to apply a full update. Boy y and press Enter to confirm, or use n cancel.

Type y and press Enter to confirm the update

If you have packages that you suspect are corrupted, you can force the database download with the update to fix these issues. Even if no updates are available, pacman will check the integrity of currently installed packages. Add a second y to the string to make it happen.

sudo pacman -Syyu

How to update a specific package in Arch

If you want to update only a package use the same command as you have to install it, replacing package_name with your choice.

sudo pacman -S package_nam

Warning: It is not recommended to upgrade to specific packages often ignoring other available updates.
Due to Arch’s current release process, shortcut updates may cause issues.

If you are unsure of a package name, you can search for installed packages with the -Qs flag.

pacman -Qs string

Be sure to replace the string with your term
This will search for both names and package names, so you should easily find what you’re looking for.

Written by Felipe

April 25th, 2023 at 10:47 pm

Posted in Arch,Linux

Tagged with , , , ,

Installing Apache2 on Arch Linux

without comments

Free and open source Apache is one of the most popular servers in the world.
It is based on a focused architecture and supports all major operating systems, Linux, Windows, macOS and Solaris.
Apache is customizable and can be integrated with other, It offers many features, including load balancing , URL tracking, automatic indexing , robust support, and more.

I’ll make it simple:

Let’s do the update:

sudo pacman -Syu

On Debian is very simple:

sudo apt-get install apache2

On Arch Linux:

pacman -S apache

Then we can create the symbolic link, to boot apache on the start.
and we use these commands:

systemctl start httpd
systemctl enable httpd

We can check the status:

systemctl status httpd

Apache. You can create it in the Apache default root directory using the following command:

nano /srv/http/index.html

Let’s just add some html code in a file:

<html>
 <title>APACHE2 - ARCH LINUX</title>
  <body>
   <h2>APACHE2 - ARCH LINUX</h2>
  </body>
</html>

Written by Felipe

April 25th, 2023 at 10:33 pm

Posted in Arch,Debian,Linux

Tagged with , ,

Installing and Configuring Samba Server on Arch Linux

without comments

Samba, also known as from “Server Message” is a protocol that provides print file services between clients on different operating systems.
Samba allows us to access and use files, computers, and other commonly shared resources on a local intranet.
It can be run on tqgvbgnmkd-based platforms and is able to communicate with Windows clients.

In this tutorial, we will show you how to install configure Samba server on Arch Linux.

Check if you have to update anby sort of package:

pacman -Syu

Installing Samba Server
Samba server package is included in the Arch Linux default repository. You can install it with the following command.

pacman -S samba smbclient

After installing the server, you can verify the Samba version:

smbd --version

Basically I have this config. in the smb config file in samba (/etc/samba/smb.conf)

I decided to make it more cool to check the files in a Mac using a better Icon for the Machine with the parameters, fruit:model = Macintosh, and others …


# general config

min protocol = SMB2
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:metadata = stream
fruit:model = Macintosh
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes

#folders private / public

[Private]
comment = private share
path = /home/felipe/private
browseable = yes
guest ok = no
writable = yes
valid users = felipe

[Public]
comment = public share
#path = /home/felipe/pub
path = /opt/sambapub
browseable = yes
writable = yes
guest ok = yes
#valid users = nobody

We start the whole thing:

sudo systemctl start smb nmb
sudo systemctl enable smb nmb

Another important thing is to enable the services with enable (replacing the start in the above).

Proper permissions for the public directory

sudo chown -R nobody:nobody /sambapub

sudo chmod -R 777 /sambapub

Also, adding a user:

sudo smbpasswd -a username

Do not forget to install avahi deamon.

sudo pacman -S avahi 
sudo systemctl enable --now avahi-daemon.service 
sudo systemctl start avahi-daemon

Written by Felipe

April 25th, 2023 at 5:10 pm

Posted in Arch,Linux

Tagged with , ,