Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Wednesday, November 28, 2018 at 23:47


Continuing second part, in this part I discuss Trisquel filesystem so you will know your Home Directory and other places you will use everyday. This involves running the file manager, understanding and managing things you look at it, including your disk partitions and external storages, and how to examine your disk capacity usage. You will also see permission and ownership information of files. By knowing the filesystem, I hope you can work with Trisquel GNU/Linux better and easier for your life. Happy working!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.

Don't have Trisquel OS yet? Download it gratis at www.trisquel.info.

Summary


  • 1. Where's Your File Manager?
  • 2. Filesystem Table
  • 3. Working with Filesystem
  • 4. Important Folders
  • 5. Limitations You Should Know
  • 6. Permission and Ownership
  • 7. Unlock Unlimited Mode of File Manager
  • 8. Partitions and Storages
  • 9. Show Hidden Files

1. Where To Access Filesystem?


Click folder with home logo beside start menu on your panel. Other way, open start menu > Places > Home Folder. That place shows your filesystem. First place you see there is called your personal Home Directory.

(Start menu showing filesystem access)

2. Filesystem Table


In brief, you need to see your own filesystem structure. Here, I assume your username is trisquel.

Directory Name Description
/ Top directory, called "root directory". All directories mentioned below are located under this.
/boot GNU bootloader and Linux-libre kernel are stored here.
/dev Hardware devices place, stored in their "raw" forms (before being mounted).
/etc Configuration files central. Generally all programs store their configs here.
/home Home directory, inside this, there are folders named after their owner's usernames.

  • /home/trisquel: there is a user named trisquel having personal directory named trisquel too
  • /home/bunny: if there is another user, they will have a personal directory named after their username too
/media Mounted volumes place, such as disk partitions and USB disk drive. Every volume will be mounted under a subfolder named after their owner's usernames.

  • /media/trisquel/MYUSBDRIVE: a disk drive named MYUSBDRIVE will be placed under trisquel directory under /media
  • /media/trisquel/MYPARTITION: an internal disk partition named MYPARTITION will be placed there too
  • /media/trisquel/MYEXTERNALDRIVE1: an external hard disk's partition named MYEXTERNALDRIVE1 will be placed there too
/opt Optional directory to place special programs to be installed outside of normal place. For example, XAMPP will install itself here.
/proc Virtual filesystems place for processes, needed by an OS running.
/sys Kernel-oriented important files place, needed by the Linux-libre kernel.
/tmp Temporary directory, all running programs put their temporary files (cache, cookies, etc.) here.
/usr User programs directory, all installed and manually-installed programs are stored here. All libraries and miscellaneous files incorporating those programs are also stored under this.
/var Variable files place, usually package managers and web servers and others store their cache files and software packages here.

3. Working with Filesystem


It's not difficult at all. See below, left panel shows the whole folders on Trisquel GNU/Linux system. This place is called / (root), our main partition. On the other hand, right panel shows personal folders of a user. This place is called /home/trisquel since in this example the username is also trisquel. If your username is bunny, it should be /home/bunny and so on. Those are the basics.

(Caja: see the address bar on left and on right)

3.1 Create New Folder & New File


  • To create new folder, simply right-click > Create Folder > type name you wish > press Enter. 
  • To create new file, simply right-click > Create Document > Empty File > type name you wish > press Enter. 
  • To delete file(s) temporarily (go to "Recycle Bin"), simply select and press Delete key. 
  • To delete file(s) permanently, simply select and press Shift+Delete keys. 
  • To copy and paste file(s), simply select and press Ctrl+C, then open the target folder and press Ctrl+V
  • To rename a file, simply select and press F2 and type new name and press Enter.

You see, in this case, Trisquel is not different to other OS.

3.2 See File Size


You can see file size in B, KB, MB, and GB units. For folders, select it, right-click > Properties > you can see total size of all files inside it. You can also see total size of several files at once.

(Folder "dokumen": totaling size of all files in a folder; counted here 700MB out of 1,300 files)

3.4 See Disk Capacity and Free Space 


You can see your partition capacity as well as its free space by right-clicking empty area on it > Properties > see the pie chart information.

 (Partition "libre2": totaling partition capacity and its free size; counted here 33GB total capacity with 31GB used and only 1GB free)

3.5 Analyze Your Disk Capacity Usage


Go to start menu > Accessories > MATE Disk Usage Analyzer. Use this program to scan your disk to know which folders eat up your disk capacity the most. You can run this program from the terminal too by invoking mate-disk-usage-analyzer command.

(The Analyzer showing that .mozilla and .cache are two folders with most disk usage under my Home Directory)

4. Where Are Your Important Folders?


There are three basic questions: where is your Downloads folder located? Where is your installed programs located? And, where is your disk partitions or external storages located? The answer is very clear because on Trisquel, there is distinction between user directory and system directory. The answer to first question is user directory, under the the /home address; while second and third are system directories, all directories under / except /home. It's that easy. However, installed programs are separated in several different directories mainly /usr/bin and /usr/lib, while partitions are always located under /media/ address. It makes sense much more now, right?

 (/home/trisquel is your Home address, and /home/trisquel/Downloads is your Downloads folder address)

(When you open /home/trisquel/Downloads, you see folders and files inside it; and ebooks folder there would have address /home/trisquel/Downloads/ebooks

5. Your Rights and Limited Access


Then, what is the difference between user and system directories? The real difference is your access rights: a user has control only on their respective personal directories (under /home), and a user has no control at all over system directories. This means you can only save files under your own personal directories, and you cannot write or modify or delete all files under /. A user named trisquel can only write into /home/trisquel, he cannot write into /, even he cannot write into other user's personal directories. You need to know this since many users came from Microsoft Windows tend to think there is no distinction between both and often confused why they cannot write into certain folders.

(Copying files into own Home directory is OK)

(But, copying same files into system directory is NOT OK, it's not permitted)

6. Permission and Ownership


In GNU-like operating system, every file bears two security things: permission and ownership information; which are obeyed by the system. Permission is notated in read-write-executable (rwx) triple rights, and, ownership is notated in user-group-others (ugo) triple ownerships. So all of your files and folders have those security protection in Trisquel and you can also adjust any of them to suit your needs. You can earn these security system by yourself at https://chmod-calculator.com.

To see permission and ownership information, right-click a file > Properties > Permissions.

 (Permission & ownership information of a folder "Documents")


(Permission and ownership information of a file  "Screenshot-xyz.png")

To change permission and ownership of a personal file, simply use Properties like above. But to change them in the system directory, you cannot do that, so follow the next section.

7. Accessing System Directory


The secret is, you can have unlimited access to whole filesystem if you turn yourself into root user. root, not to be confused with / directory, is a name for superpower user or administrator which is built-in in Trisquel. To write or modify or delete system directory, you use special command called gksudo to open the Caja File Manager. How to do it? You press Alt+F2 and type gksudo caja and enter your password and you see your files under /root. That's the basic.

(See titlebar: root (as superuser) means currently file manager opened in unlimited mode, you can write into all system directories absolutely; see Location: /root means your starting point is /root directory and not /home/trisquel)

Please notice that /root is not the same as /, because /root is a folder under /. It's a special folder belongs to root user so it's called root, just like /home/trisquel called that because the username is trisquel.

Please remember to close the file manager each time you finished a task and never let it opened for a long time. It's dangerous if you accidentally delete important system files because of it.

8. Accessing Partitions and Storages


Most computer users typically have multiple disk partitions. If you do, you will see your partitions on left panel of Caja File Manager. See below.

 (Left: partitions; Right: partitions, all mounted)

For USB Flash Drive and such external drives, it's also the same, you will see its name like this. The d-live drive below is my USB drive for example.

(A USB Flash Drive: lately plugged disk will showed on bottom)

9. Show Hidden Files


Press Ctrl+H on Caja. When showed, you will really see .mozilla, .cache, and other period-prefixed files and folders which are originally hidden. Press Ctrl+H again and they're hidden once again. If you cannot press keys, you can go to menubar View > Show Hidden Files. This one is the last thing you need to know as basics for desktop living.

(Showing .xchat2 folder and .Xauthority file which are originally hidden)

Caja File Manager


Since the beginning of this article, you see Caja, Caja, and Caja. What's Caja, anyway? Caja is file manager program, equal to Explorer on Windows or Finder on macOS. Caja is an official file manager of MATE Desktop Environment so every GNU/Linux OS using MATE would have Caja too (Trisquel 8.0 is an example). The secret is, Caja is a modification of Nautilus from GNOME 2 era. That's why you find Caja to have split vertical, menu bar, folder colors, cute emblems, many features you ever found on the oldies GNOME 2.

 (Caja File Manager showing its details: version 1.12.7 and a description)

End Words


That's all. You will need these filesystem knowledge in the rest of your computing life with Trisquel OS. I hope you will find this article useful. Next time, I will discuss about how to be productive using built-in programs: produce documents with LibreOffice and edit pictures with GIMP. Enjoy Trisquel, see you next time!

to be continued...


This article is licensed under CC BY-SA 3.0.