Sunteți pe pagina 1din 3

PRACTICAL LINUX PROJECTS

1. Security
a) get antivirus program working on ubuntu
-see how clamtk works, whether it is always running, how to turn it on/off,e tc.

Clam Tk is a graphical interface for Clam Antivirus. It is designed to be an easy-to-use,


lightweight, on-demand desktop virus scanner for Linux. Many of the feautures don't seem to
work properly in the GUI version.

The command line version, Clam AV, should work better.


To scan entire system and remove all infected files (using Clam AV):
$ clamscan -r –remove /

Most importantly, very few people ever have trouble with viruses on Linux because almost all
malware is designed for Windows. The best policy, from what I have read, is to be careful about
what websites you visit and what you accept.

b) command line firewall


-same thing: what's it called, how it runs, how to manage it

It's called iptables (or IP tables). It works by way of “chains”, the most basic of which are those
that “accept” and those that “drop”. To see the chains currently set, the command is: (sudo)
iptables -L

As of right now, I can't tell what it's doing but it is at least doing something. In the future, I
might keep my eye open for a GUI app that manages Ubuntu firewall (one is Shorewall, but it is
supposedly more advanced and may be CLI-based)

2. Backup
a) figure out the easiest way to back up all files (for free or one-type payment for backup
system) – problem is 175G of books

Using Clonezilla
requirements:
-external hard drive (must be at least same size as original hard drive)
-clonezilla iso image (http://clonezilla.org/downloads.php

Using Mondo Rescue


-can create complete system ISO image to USB flash drive

For now:
just get an external hard drive and copy all data files
1) buy external hard drive
2) if doesn't work with ext4 (which is current file system), just format current hard drive to NTFS so it
is compatible with external
3) just backup /home after partitioning (one partition for backup, one partition for Fedora, one partition
for Ubuntu 18.04)
4) optional: if you want to backup preferences, can use symbolic links to move the /usr/local and /opt
directories to (for example) /home/ur-local and homeopt

GUI file compression:


-right click, but amount of time it takes vs. space saved is not worth it (will only compress to about 8 to
9/10 original size, so might as well just copy)

Verdict: buy at least 250G (but probably 1T) external hard drive at Best Buy, hopefully with ext4 file
system, but if not can format computer for NTFS)

3. Disk partitioning
a) make sure you know how to partition a disk in ubuntu, in theory and in practice and could do
it if you wanted to
b) understand for what purposes disks are partitioned

How to partition a disk in Linux:


different methods:
1. MBR (traditional method)
-stores partitioning info in MBR (master boot record)
-can create four partitions (if want more, need extended partitions—won't worry about that now)

2. “GUID Partition Table” (or GPT, modern method)


-to use GPT-partitioned media, need to enable the “EFI GUID Partition support” in the kernel (already
the case with current distributions)

After partitions are created, need to generate file systems on the partitions.

Size:
30 GiB per partition
3 partitions (1 for Ubuntu, 1 for Fedora, 1 for backup)
original hard disk: when you erase and partition: 2 partitions

Procedure for creating and including new partitions (even while system is running):
1. backup the current boot sectors and data on the hard disk in question
-dd command to copy MBR (identically sized partitions only):
dd if=/dev/sda of=/dev/sdb bs=512 count=1
-dd command for two discs with different size partitions:
dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1
-to restore the image to any sdb:
dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1
-here's what another source says to do:
“Data and boot-sector contents can be saved using the dd program (among others)”:
dd if=/dev/sda of=/dev/st0 “ (will save all of the sda hard disk to magnetic tape)

2. partition the disk using fdisk (or a similar program)


a) command: $ fdisk /dev/sdb
-on an empty (unpartitioned) disk fdisk will by default create an MBR partition table, but you can
change this afterwards to GPT
b) create a new partition using the “n” command (while still in fdisk)
-select “p” (default)
-enter partition number
a) enter number for that partition
b) will ask for size, accept default for beginning
c) important part is “last” (the ending size): to make a partition of 10G, type in “+10G”
d) repeat this process for as many partitions as you want
-should get readout telling you sizes created, where located, how many and what type
-now the “p” command will display the current partition table
-here you can change the partition type using the “t” command
-select the desired partition and enter code (as hex)
-“L” displays whole list
-delete a partition you no longer want with “d” command
-when finished, write partition table to disk and quit program using “w”
-to quit program without rewriting partition table: “q”
(if partitioned disk is a disk in use, kernel won't be able to reread new parittion table, will have to
reboot)
- “l” displays the parittion table of the selected disk and then terminates the program
3. possibly create file systems on the new partitions (“formatting”)
-to create ext4 file system:
$ mkfs -t ext4 /dev/sdb
(need to do this for each partition, so for example:
$ mkfs -t ext4 /dev/sdb1
then:
$mkfs -t ext4 /dev/sdb2, etc.
(can also use ($ mkfs.ext4 /dev/sdb1) (presumably use same sdb ending as in fdsk)
4. making the new file system accessible using mount or /etc/fstab
-to mount a medium, for example a hard disk partition, you must specify its device file and the desired
mount point:
$ mount -t ext4 /dev/sda5 /home
-it is not mandatory to specify the file system type using the -t option, since the kernel can generally
figure it out for itself
-if the partition is mentioned in /etc/fstab (try cat /etc/fstab), it is sufficient to give either the mount
point or the device file:
$ mount /dev/sda5
$mount /home
1) get How Linux Works again from library
2) compare what it says with online guide

4. Research and select a (non-debian) version of Linux to use


*Fedora (Red Hat Enterprise is for businesses?)
Mint

5. Determine how to install the non-Debian version of Linux


a) after backing up files
b) install and use non-Debian verison of Linux on trial basis (from bootable media): Fedora
c) install permanently (replace ubuntu)
d) go back and install ubuntu 18.04 (from bootable media) (but keep non-Debian Ubuntu until
Ubuntu 20.04 is released)

S-ar putea să vă placă și