This brought tears to my eyes.
A fantastic post and a must-read or -have for any Debian admin and user.
That reminds me of the plethora of options to search through Debian packages. To make it swift. I will just copy the commands from the Ubuntu documentation* as the Debian handbook that I have here still talks about aptitude that I do not use personally.
Search commands
apt-cache search <search_term>
Each package has a name and a description. This command lists packages whose name or description contains <search_term>.
dpkg -l *<search_term>
This will find packages whose names contain <search_term>. Similar to apt-cache search, but also shows whether a package is installed on your system by marking it with ii (installed) and un (not installed).
apt-cache show <package_name>
This command shows the description of package <package_name> and other relevant information including version, size, dependencies and conflicts.
dpkg --print-avail <package_name>
This command is similar to βapt-cache showβ.
dpkg -L <package_name>
This command will list files in package <package_name>.
dpkg -c foo.deb
This command lists files in the package βfoo.debβ. Note that foo.deb is a pathname. Use this command on .deb packages that you have manually downloaded.
dlocate <package_name>
This command determines which installed package owns <package_name>. It shows files from installed packages that match <package_name>, with the name of the package they came from. Consider this to be a βreverse lookupβ utility.
dpkg -S <filename_search_pattern>
This command does the same as dlocate, but does not require the installation of any additional packages. It is slower than dlocate but has the advantage of being installed by default on all Debian and Ubuntu systems.
apt-file search <filename_search_pattern>
This command acts like dlocate and dpkg -S, but searches all available packages. It answers the question, βwhat package provides this file?β.
apt-cache pkgnames
This command provides a listing of every package in the system
- A general note on searching: If searching generates a list that is too long, you can filter your results by piping them through the command grep. Examples:
apt-cache search <filename> | grep -w <filename>
will show only the files that contain as a whole word
dpkg -L package | grep /usr/bin
will list files located in the directory /usr/bin, useful if youβre looking for a particular executable.
For more info on the usage of apt just type:
man apt
Edit: Now you can also use the abbreviated
apt search
instead of apt-cache search
I am not sure where to post this as it is a comprehensive guide of all apt/apt-get commands but I will just stay within the last posts here regarding aptβs usage.
I knew that Linux Mint has a ton of extra apt commands but I did not know how much actually, interesting.
Well, I have given some thought to this phenomenon over the last 2 years and have a couple of other solutions β though none as elegant as the double tack to indicate the end of arguments.
Create the problem:
# create an empty file with a troubling name
> --help
1) Remove the problem file by specifying the path (absolute or relative) in front of the file:
# using an absolute path
rm /home/user/path/to/--help
or simply:
# using a relative path
rm ./--help
2) Remove the file by deleting it via its inode number. First display the inode number:
ls -ltri
39482924 -rw-rw-r-- 1 mark mark 0 Aug 28 22:04 --help
Then pass the inode number to the find command with a delete action:
find -inum 39482924 -delete
@Ulfnic, thanks for giving me something to think about for the last 2 years!
Deleting it via inode lol, brilliant never knew you could do that.
To change console tty colors
As root
echo -en β\e]P7d81521β
Bright red text
echo -en β\e]e1a464β
A reddish tinted oatmeal tan background wirh bright red text.
How about a WAKE UP theme?
P000ffff
Green light is just as stimulating as blue light to reduce melatonin production and cue your circadian rhythm for the day, up to an hour.
After an hour, if you are outside or under white lights, the blue light becomes twice as effective to set your circadian rhythm. May as well have both green and blue at max brightness, with no red light.
P778cf99
A faded olive-green
Or how about a warm inviting start to the day
P0ff9921
P7ffc376
I had to increase text brightness, making it more yellow because it was quite faded matching the hue of the p0
for coffee lovers:
P0281208
P7784422
I like a nice dull purple for relaxing, but dull opensuse greens are also nice
P0321621
P7786424
I have tried a variety of combonations, another one I enjoy is a warm yellow, a little more green brightness than the orange color I posted
So have fun, and the other P numbers 1-6 are for the other colors, not just black and light grey.
setterm --background yellow
can also be a simpler yet less customizable way to do this and changing P0 - P7 values affects the color choices in setterm.