LQ Poll: What's your favorite Linux terminal trick?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
br@lorien:/mnt/arwen-sd$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=4024628k,nr_inodes=1006157,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=809656k,mode=755)
/dev/sdb2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=44,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1518)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb4 on /export type ext4 (rw,relatime,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
/etc/auto.jail on /export/home/jail/home type autofs (rw,relatime,fd=6,pgrp=1197,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=27866)
/etc/auto.hd on /mnt/hd type autofs (rw,relatime,fd=12,pgrp=1197,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=26558)
/etc/auto.cifs on /mnt/cifs type autofs (rw,relatime,fd=18,pgrp=1197,timeout=120,minproto=5,maxproto=5,indirect,pipe_ino=27006)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809652k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
//arwen/arwen-sd on /mnt/cifs/arwen-sd type cifs (ro,relatime,vers=3.0,cache=strict,username=br,domain=,uid=1000,forceuid,gid=100,forcegid,addr=192.168.0.110,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
Note: These functions are for bash. If you use another shell, syntax could be different. If you want a shell-agnostic solution, you should replace functions with shell scripts.
Last edited by bodiccea; 05-17-2019 at 01:46 PM.
Reason: bash precision.
is what i like very much. This way one can combine the shell-ability to repeat with the calculator "bc" and really use the box for fast, precise and comfortable calculating.
I recently learned how to use quick history `ctrl + r` in the terminal and I use it all the time now.
* ctrl + r
* Type a command you previously used
* (optional) ctrl + r to go back one entry further
* press enter to execute or arrow keys and type to change your previous command.
I am not sure if it counts as a keyboard trick, but better than #9 posted by hydrurga, to cut and paste, instead of CTRL-c/CTRL-v, simply highlight whatever you want to copy, move to the place you want it pasted and click with the middle button of the mouse (can be in a different window for a different application). I use this a lot!
0:% TZ=Europe/Bucharest date
Fri 17 May 14:36:53 EEST 2019
0:% TZ=Europe/London date
Fri 17 May 12:37:06 BST 2019
0:% TZ=Asia/Tokyo date
Fri 17 May 20:37:22 JST 2019
0:%
TAB - Shortcut and time saver
Ctrl + d - Logout
Ctrl + l - Clear the terminal
Crtl + r - Latest commands
Crtl + a and + e - Cursor back to the beginning or end of the line.
to add a sound (lion.wav) after long command execution.
When I have a long command running I add "date" (no quotes) and hit enter... this shows when the long command finished. I sometimes want to know how long it took so I write down the time I started then add that "date" command.
When I have a long command running I add "date" (no quotes) and hit enter... this shows when the long command finished. I sometimes want to know how long it took so I write down the time I started then add that "date" command.
I use "time" command for that... At the end of command execution, it shows exactly how long it took to run; example:
Code:
$ time dmesg
.....
real 0m0.037s
user 0m0.004s
sys 0m0.016s
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.